cast 4byte
=> 함수이름 알려줌
cast 4byte 0x8770ba91
=> unoswap2(uint256,uint256,uint256,uint256,uint256)
cast 4byte-decode
=> decode 해줌
cast 4byte-decode 0x83800a8e00000000000000000000000095a62521c655e7a24a3919aa1f99764c05b7ec4e000000000000000000000000000000000000000000000006490e2084a2bc8000000000000000000000000000000000000000000000000000000000000da00578288000000000000000000000f12ecab44254543c049b3b57db9f06c91a27793467259e51
=> 1) "unoswap(uint256,uint256,uint256,uint256)"
854344783203238942565269081126754994719462779982 [8.543e47]
115944645210738032640 [1.159e20]
228590968 [2.285e8]
18318670367622288729119628489079489440167781947285305151340061021867233212724 [1.831e76]
foundry deploy
배포하고 verify까지 한번에
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import {Script} from "forge-std/Script.sol";
import {TestContract} from "../src/TestContract.sol";
contract DeployScript is Script {
function run() external {
bytes32 privateKeyBytes = vm.envBytes32("MAIN_PKEY");
uint256 privateKey = uint256(privateKeyBytes);
vm.startBroadcast(privateKey);
new TestContract();
vm.stopBroadcast();
}
}
//forge script script/DeployScript.s.sol --rpc-url $MAIN_POLYGON_URL --verify --etherscan-api-key $POLYGON_APIKEY --broadcast
'개발 참고자료' 카테고리의 다른 글
User-defined Value Types (0) | 2024.07.15 |
---|---|
[정리] solidity diamond proxy pattern (0) | 2024.04.30 |
[정리] solidity call, delegatecall (0) | 2024.04.30 |
[정리] Use Ownable2Step Instead (0) | 2023.12.11 |