From b9532b1ae8eb1509216a982d3b86061fa4eef226 Mon Sep 17 00:00:00 2001 From: - <-> Date: Sun, 26 May 2024 23:07:47 +0700 Subject: [PATCH] Updated Solidity compiler to v0.8.26 and evmVersion to cancun. --- README.md | 32 ++-- .../Create3Deployer.sol/Create3Deployer.json | 149 ------------------ hardhat.config.js | 7 +- package.json | 4 +- scripts/deployKeylessly-TESTERC20UG.js | 4 +- scripts/deployViaCREATE3-TESTERC20.js | 8 +- scripts/deployViaCREATE3-TESTERC20UG.js | 10 +- yarn.lock | 10 +- 8 files changed, 36 insertions(+), 188 deletions(-) delete mode 100644 artifacts-saved/@axelar-network/axelar-gmp-sdk-solidity/contracts/deploy/Create3Deployer.sol/Create3Deployer.json diff --git a/README.md b/README.md index 6f2932d..e80ab55 100644 --- a/README.md +++ b/README.md @@ -77,15 +77,15 @@ Axelar's factory was included because they are a trustworthy organization doing The original solidity files were obtained by firstly adding the npm package `@axelar-network/axelar-gmp-sdk-solidity` and importing `@axelar-network/axelar-gmp-sdk-solidity/contracts/deploy/Create3Deployer.sol` in `contracts/Imports.sol`. Hardhat then compiles it and places the artifacts in `artifacts` directory. `Create3Deployer.json` is then copied to `artifacts-saved/@axelar-network/axelar-gmp-sdk-solidity/contracts/deploy/Create3Deployer.sol/` directory for preservation of the bytecode. -Gas used for the deployment is around 724,337, so gas limit in this deployment transaction has been set to 900,000, giving some room in case some opcode costs increase in future, hence there should be at least 0.09 of native currency at the signer's address before factory deployment. +Gas used for the deployment is around 737,521, so gas limit in this deployment transaction has been set to 900,000, giving some room in case some opcode costs increase in future, hence there should be at least 0.09 of native currency at the signer's address before factory deployment. -Axelar's factory contract will be deployed to this address (if the EVM version is `shanghai` and transaction bytecode is unchanged): +Axelar's factory contract will be deployed to this address (if the EVM version is `cancun` and transaction bytecode is unchanged): ``` -0x95A9323CF0443758df5F3becf3B221cB3D42f3A0 +0x8cf037a598957EFE440841E256f4CA0056A8219C ``` The derived address of the account that would sign the deployment transaction, and that you'd need to fund in order to pay the gas fee, is: ``` -0x152510503b8f5EB95dc34aAF274DFc858d609DF5 +0xa800eb61836539b33ad43201b7997ED30bA75f5D ``` #### ZeframLou & transmissions11/solmate @@ -99,15 +99,15 @@ The solmate CREATE3 library was obtained by adding the github repository commit `@SKYBITDev3/ZeframLou-create3-factory/src/CREATE3Factory.sol` is imported in `contracts/Imports.sol`. Hardhat then compiles it and places the artifacts in `artifacts` directory. `CREATE3Factory.json` is then copied to `artifacts-saved/@SKYBITDev3/ZeframLou-create3-factory/src/CREATE3Factory.sol/` directory for preservation of the bytecode. -Gas used for the deployment is around 389,011, so gas limit in this deployment transaction has been set to 500,000, giving some room in case some opcode costs increase in future, hence there should be at least 0.05 of native currency at the signer's address before factory deployment. +Gas used for the deployment is around 392,687, so gas limit in this deployment transaction has been set to 500,000, giving some room in case some opcode costs increase in future, hence there should be at least 0.05 of native currency at the signer's address before factory deployment. -ZeframLou's factory contract will be deployed to this address (if the EVM version is `shanghai` and transaction bytecode is unchanged): +ZeframLou's factory contract will be deployed to this address (if the EVM version is `cancun` and transaction bytecode is unchanged): ``` -0x2befaF9234EE4d5b10dDAECF55F73dA87F74Facb +0x03B583D983aAe5a965dfCC3565F58C9153Af1Be3 ``` The derived address of the account that would sign the deployment transaction, and that you'd need to fund in order to pay the gas fee, is: ``` -0x1C5aEAeb492367E680e2aD965fE2Ac90E5c648cf +0x9dA930687de2ac5a056dbD80BCDb99c7008f1750 ``` #### SKYBIT & Vectorized/solady The Vectorized/solady CREATE3 library has been included because it is more gas-efficient than other options. A factory contract is needed to use the library so a new one was created based on ZeframLou's factory. @@ -118,15 +118,15 @@ The original Vectorized/solady CREATE3 solidity file was obtained by firstly add `contracts/SKYBITCREATE3Factory.sol` imports `{CREATE3} from "@Vectorized/solady/src/utils/CREATE3.sol";`. Hardhat then compiles it and places the artifacts in `artifacts` directory. `SKYBITCREATE3Factory.json` is then copied to `artifacts-saved/contracts/SKYBITCREATE3Factory.sol/` directory for preservation of the bytecode. -Gas used for the deployment is around 230,784, so gas limit in this deployment transaction has been set to 300,000, giving some room in case some opcode costs increase in future, hence there should be at least 0.03 of native currency at the signer's address before factory deployment. +Gas used for the deployment is around 260,068, so gas limit in this deployment transaction has been set to 300,000, giving some room in case some opcode costs increase in future, hence there should be at least 0.03 of native currency at the signer's address before factory deployment. -The SKYBITSolady factory contract will be deployed to this address (if the EVM version is `shanghai` and transaction bytecode is unchanged): +The SKYBITSolady factory contract will be deployed to this address (if the EVM version is `cancun` and transaction bytecode is unchanged): ``` -0xF545230eE44735CCDb71325c6D4bC981b444CBb6 +0x5391d63aBd39A43360CE360531f5Ba5c19249030 ``` The derived address of the account that would sign the deployment transaction, and that you'd need to fund in order to pay the gas fee, is: ``` -0x7a2c43Cb49D08a68D8F6Ac708A55716C3cd78557 +0x0d253cCC774aa8F6619FC6C094D961a09Ce50865 ``` #### SKYBITLite @@ -136,7 +136,7 @@ The node package [@skybit/hardhat-yul](https://www.npmjs.com/package/@skybit/har Gas used for the deployment is 78,914, so gas limit in this deployment transaction has been set to 100,000, giving some room in case some opcode costs increase in future, hence there should be at least 0.01 of native currency at the signer's address before factory deployment. -The SKYBITLite factory contract will be deployed to this address (if the EVM version is `shanghai` and transaction bytecode is unchanged): +The SKYBITLite factory contract will be deployed to this address (if the EVM version is `cancun` and transaction bytecode is unchanged): ``` 0x739201bA340A675624D9ADb1cc27e68F76a29765 ``` @@ -463,18 +463,18 @@ See also `contracts/TESTERC20.sol` in which the constructor accepts an array of An alternative is to replace `msg.sender` with `tx.origin`, but Vitalik said that we shouldn't rely on `tx.origin`. Feel free to do some research if you're curious. ### Invalid opcode -It's generally best practice to use the latest released versions of technology. However Hardhat v2.17.3 downgraded the default EVM version from `shanghai` to `paris`. So if you want to use the latest EVM then you need to set the EVM version explicity in `hardhat.config.js` like this: +It's generally best practice to use the latest released versions of technology. However Hardhat v2.17.3 downgraded the default EVM version to `paris`. So if you want to use the latest EVM then you need to set the EVM version explicity in `hardhat.config.js` like this: ```js solidity: { // changing these values affects deployment address compilers: [ { - version: `0.8.24`, + version: `0.8.26`, settings: { optimizer: { enabled: true, runs: 15000 }, - evmVersion: `shanghai` // downgrade to `paris` if you encounter 'invalid opcode' error + evmVersion: `cancun` // downgrade to `paris` if you encounter 'invalid opcode' error } }, ], diff --git a/artifacts-saved/@axelar-network/axelar-gmp-sdk-solidity/contracts/deploy/Create3Deployer.sol/Create3Deployer.json b/artifacts-saved/@axelar-network/axelar-gmp-sdk-solidity/contracts/deploy/Create3Deployer.sol/Create3Deployer.json deleted file mode 100644 index a85013c..0000000 --- a/artifacts-saved/@axelar-network/axelar-gmp-sdk-solidity/contracts/deploy/Create3Deployer.sol/Create3Deployer.json +++ /dev/null @@ -1,149 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "Create3Deployer", - "sourceName": "@axelar-network/axelar-gmp-sdk-solidity/contracts/deploy/Create3Deployer.sol", - "abi": [ - { - "inputs": [], - "name": "AlreadyDeployed", - "type": "error" - }, - { - "inputs": [], - "name": "DeployFailed", - "type": "error" - }, - { - "inputs": [], - "name": "DeployInitFailed", - "type": "error" - }, - { - "inputs": [], - "name": "EmptyBytecode", - "type": "error" - }, - { - "inputs": [], - "name": "NativeTransferFailed", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "deployedAddress", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "bytecodeHash", - "type": "bytes32" - } - ], - "name": "Deployed", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "bytecode", - "type": "bytes" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - } - ], - "name": "deploy", - "outputs": [ - { - "internalType": "address", - "name": "deployedAddress_", - "type": "address" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "bytecode", - "type": "bytes" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "init", - "type": "bytes" - } - ], - "name": "deployAndInit", - "outputs": [ - { - "internalType": "address", - "name": "deployedAddress_", - "type": "address" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "bytecode", - "type": "bytes" - }, - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - } - ], - "name": "deployedAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x60a060405234801561000f575f80fd5b5060405161001f60208201610043565b601f1982820381018352601f90910116604052805160209190910120608052610050565b61019180610c8883390190565b608051610c1961006f5f395f81816103cc01526105310152610c195ff3fe608060405260043610610033575f3560e01c80634af63f0214610037578063c2b1041c14610073578063cf4d643214610092575b5f80fd5b61004a610045366004610896565b6100a5565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b34801561007e575f80fd5b5061004a61008d3660046108d8565b610188565b61004a6100a0366004610946565b6101e0565b604080513360208201529081018290525f9081906060016040516020818303038152906040528051906020012090506100de8482610367565b915034156101065761010673ffffffffffffffffffffffffffffffffffffffff83163461047f565b61011084826104c6565b9150823373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fd579261046780ec80c4dae1bc57abdb62c58df8af1531e63b4e8bcc08bcf46ec878051906020012060405161017991815260200190565b60405180910390a45092915050565b6040805173ffffffffffffffffffffffffffffffffffffffff841660208201529081018290525f9081906060016040516020818303038152906040528051906020012090506101d78582610367565b95945050505050565b604080513360208201529081018490525f9081906060016040516020818303038152906040528051906020012090506102198682610367565b915034156102415761024173ffffffffffffffffffffffffffffffffffffffff83163461047f565b61024b86826104c6565b9150843373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fd579261046780ec80c4dae1bc57abdb62c58df8af1531e63b4e8bcc08bcf46ec89805190602001206040516102b491815260200190565b60405180910390a45f8273ffffffffffffffffffffffffffffffffffffffff1685856040516102e49291906109d9565b5f604051808303815f865af19150503d805f811461031d576040519150601f19603f3d011682016040523d82523d5f602084013e610322565b606091505b505090508061035d576040517f139c636700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050949350505050565b604080517fff000000000000000000000000000000000000000000000000000000000000006020808301919091527fffffffffffffffffffffffffffffffffffffffff00000000000000000000000030606090811b82166021850152603584018690527f0000000000000000000000000000000000000000000000000000000000000000605580860191909152855180860390910181526075850186528051908401207fd6940000000000000000000000000000000000000000000000000000000000006095860152901b1660978301527f010000000000000000000000000000000000000000000000000000000000000060ab8301528251808303608c01815260ac90920190925280519101205f905b9392505050565b5f805f805f85875af19050806104c1576040517ff4b3b1bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b5f6104788383604080517fff000000000000000000000000000000000000000000000000000000000000006020808301919091527fffffffffffffffffffffffffffffffffffffffff00000000000000000000000030606090811b82166021850152603584018690527f0000000000000000000000000000000000000000000000000000000000000000605580860191909152855180860390910181526075850186528051908401207fd6940000000000000000000000000000000000000000000000000000000000006095860152901b1660978301527f010000000000000000000000000000000000000000000000000000000000000060ab8301528251808303608c01815260ac909201909252805191012082515f03610614576040517f21744a5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6106338173ffffffffffffffffffffffffffffffffffffffff16610769565b1561066a576040517fa6ef0ba100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f82604051610678906107b5565b8190604051809103905ff5905080158015610695573d5f803e3d5ffd5b50905073ffffffffffffffffffffffffffffffffffffffff81166106e5576040517fb4f5411100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517e77436000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82169062774360906107359087906004016109e8565b5f604051808303815f87803b15801561074c575f80fd5b505af115801561075e573d5f803e3d5ffd5b505050505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82163f801580159061047857507fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470141592915050565b61019180610a5383390190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f82601f8301126107fe575f80fd5b813567ffffffffffffffff80821115610819576108196107c2565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561085f5761085f6107c2565b81604052838152866020858801011115610877575f80fd5b836020870160208301375f602085830101528094505050505092915050565b5f80604083850312156108a7575f80fd5b823567ffffffffffffffff8111156108bd575f80fd5b6108c9858286016107ef565b95602094909401359450505050565b5f805f606084860312156108ea575f80fd5b833567ffffffffffffffff811115610900575f80fd5b61090c868287016107ef565b935050602084013573ffffffffffffffffffffffffffffffffffffffff81168114610935575f80fd5b929592945050506040919091013590565b5f805f8060608587031215610959575f80fd5b843567ffffffffffffffff80821115610970575f80fd5b61097c888389016107ef565b9550602087013594506040870135915080821115610998575f80fd5b818701915087601f8301126109ab575f80fd5b8135818111156109b9575f80fd5b8860208285010111156109ca575f80fd5b95989497505060200194505050565b818382375f9101908152919050565b5f602080835283518060208501525f5b81811015610a14578581018301518582016040015282016109f8565b505f6040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f830116850101925050509291505056fe608060405234801561000f575f80fd5b506101748061001d5f395ff3fe60806040526004361061001c575f3560e01c806277436014610020575b5f80fd5b61003361002e366004610075565b610035565b005b8051602082015ff0610045575f80fd5b50565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f60208284031215610085575f80fd5b813567ffffffffffffffff8082111561009c575f80fd5b818401915084601f8301126100af575f80fd5b8135818111156100c1576100c1610048565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561010757610107610048565b8160405282815287602084870101111561011f575f80fd5b826020860160208301375f92810160200192909252509594505050505056fea264697066735822122044fc33cc7b0f7543122ceae54ec9d82b21f41ae997d9848e9fd84a945d7d858a64736f6c63430008180033a26469706673582212207bbd14eee0a1913c1c61e25ef3ef73d344f144b6dda65ea1ed43caf50324845b64736f6c63430008180033608060405234801561000f575f80fd5b506101748061001d5f395ff3fe60806040526004361061001c575f3560e01c806277436014610020575b5f80fd5b61003361002e366004610075565b610035565b005b8051602082015ff0610045575f80fd5b50565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f60208284031215610085575f80fd5b813567ffffffffffffffff8082111561009c575f80fd5b818401915084601f8301126100af575f80fd5b8135818111156100c1576100c1610048565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561010757610107610048565b8160405282815287602084870101111561011f575f80fd5b826020860160208301375f92810160200192909252509594505050505056fea264697066735822122044fc33cc7b0f7543122ceae54ec9d82b21f41ae997d9848e9fd84a945d7d858a64736f6c63430008180033", - "deployedBytecode": "0x608060405260043610610033575f3560e01c80634af63f0214610037578063c2b1041c14610073578063cf4d643214610092575b5f80fd5b61004a610045366004610896565b6100a5565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b34801561007e575f80fd5b5061004a61008d3660046108d8565b610188565b61004a6100a0366004610946565b6101e0565b604080513360208201529081018290525f9081906060016040516020818303038152906040528051906020012090506100de8482610367565b915034156101065761010673ffffffffffffffffffffffffffffffffffffffff83163461047f565b61011084826104c6565b9150823373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fd579261046780ec80c4dae1bc57abdb62c58df8af1531e63b4e8bcc08bcf46ec878051906020012060405161017991815260200190565b60405180910390a45092915050565b6040805173ffffffffffffffffffffffffffffffffffffffff841660208201529081018290525f9081906060016040516020818303038152906040528051906020012090506101d78582610367565b95945050505050565b604080513360208201529081018490525f9081906060016040516020818303038152906040528051906020012090506102198682610367565b915034156102415761024173ffffffffffffffffffffffffffffffffffffffff83163461047f565b61024b86826104c6565b9150843373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fd579261046780ec80c4dae1bc57abdb62c58df8af1531e63b4e8bcc08bcf46ec89805190602001206040516102b491815260200190565b60405180910390a45f8273ffffffffffffffffffffffffffffffffffffffff1685856040516102e49291906109d9565b5f604051808303815f865af19150503d805f811461031d576040519150601f19603f3d011682016040523d82523d5f602084013e610322565b606091505b505090508061035d576040517f139c636700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050949350505050565b604080517fff000000000000000000000000000000000000000000000000000000000000006020808301919091527fffffffffffffffffffffffffffffffffffffffff00000000000000000000000030606090811b82166021850152603584018690527f0000000000000000000000000000000000000000000000000000000000000000605580860191909152855180860390910181526075850186528051908401207fd6940000000000000000000000000000000000000000000000000000000000006095860152901b1660978301527f010000000000000000000000000000000000000000000000000000000000000060ab8301528251808303608c01815260ac90920190925280519101205f905b9392505050565b5f805f805f85875af19050806104c1576040517ff4b3b1bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b5f6104788383604080517fff000000000000000000000000000000000000000000000000000000000000006020808301919091527fffffffffffffffffffffffffffffffffffffffff00000000000000000000000030606090811b82166021850152603584018690527f0000000000000000000000000000000000000000000000000000000000000000605580860191909152855180860390910181526075850186528051908401207fd6940000000000000000000000000000000000000000000000000000000000006095860152901b1660978301527f010000000000000000000000000000000000000000000000000000000000000060ab8301528251808303608c01815260ac909201909252805191012082515f03610614576040517f21744a5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6106338173ffffffffffffffffffffffffffffffffffffffff16610769565b1561066a576040517fa6ef0ba100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f82604051610678906107b5565b8190604051809103905ff5905080158015610695573d5f803e3d5ffd5b50905073ffffffffffffffffffffffffffffffffffffffff81166106e5576040517fb4f5411100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517e77436000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82169062774360906107359087906004016109e8565b5f604051808303815f87803b15801561074c575f80fd5b505af115801561075e573d5f803e3d5ffd5b505050505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82163f801580159061047857507fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470141592915050565b61019180610a5383390190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f82601f8301126107fe575f80fd5b813567ffffffffffffffff80821115610819576108196107c2565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561085f5761085f6107c2565b81604052838152866020858801011115610877575f80fd5b836020870160208301375f602085830101528094505050505092915050565b5f80604083850312156108a7575f80fd5b823567ffffffffffffffff8111156108bd575f80fd5b6108c9858286016107ef565b95602094909401359450505050565b5f805f606084860312156108ea575f80fd5b833567ffffffffffffffff811115610900575f80fd5b61090c868287016107ef565b935050602084013573ffffffffffffffffffffffffffffffffffffffff81168114610935575f80fd5b929592945050506040919091013590565b5f805f8060608587031215610959575f80fd5b843567ffffffffffffffff80821115610970575f80fd5b61097c888389016107ef565b9550602087013594506040870135915080821115610998575f80fd5b818701915087601f8301126109ab575f80fd5b8135818111156109b9575f80fd5b8860208285010111156109ca575f80fd5b95989497505060200194505050565b818382375f9101908152919050565b5f602080835283518060208501525f5b81811015610a14578581018301518582016040015282016109f8565b505f6040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f830116850101925050509291505056fe608060405234801561000f575f80fd5b506101748061001d5f395ff3fe60806040526004361061001c575f3560e01c806277436014610020575b5f80fd5b61003361002e366004610075565b610035565b005b8051602082015ff0610045575f80fd5b50565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f60208284031215610085575f80fd5b813567ffffffffffffffff8082111561009c575f80fd5b818401915084601f8301126100af575f80fd5b8135818111156100c1576100c1610048565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561010757610107610048565b8160405282815287602084870101111561011f575f80fd5b826020860160208301375f92810160200192909252509594505050505056fea264697066735822122044fc33cc7b0f7543122ceae54ec9d82b21f41ae997d9848e9fd84a945d7d858a64736f6c63430008180033a26469706673582212207bbd14eee0a1913c1c61e25ef3ef73d344f144b6dda65ea1ed43caf50324845b64736f6c63430008180033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/hardhat.config.js b/hardhat.config.js index b571443..219d89c 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -122,8 +122,6 @@ networks = { ...networks, ...additionalNetworks } // RPC URL overrides in case you dont want to use the one in viem/chains: // networks.mainnet.url = `https://eth-mainnet.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}` -networks.polygonMumbai.url = `https://polygon-mumbai.blockpi.network/v1/rpc/public` - networks.bscTestnet.url = `https://data-seed-prebsc-2-s2.bnbchain.org:8545` networks.sepolia.url = `https://eth-sepolia.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}` @@ -139,14 +137,13 @@ module.exports = { solidity: { // changing these values changes bytecode, so can affect deployment address if not using CREATE3 compilers: [ { - version: `0.8.24`, + version: `0.8.26`, settings: { optimizer: { enabled: true, runs: 15000 }, - evmVersion: `shanghai`, // downgrade to `paris` if you encounter 'invalid opcode' error - // evmVersion: `paris`, + evmVersion: `cancun`, } }, ], diff --git a/package.json b/package.json index c5eb5e2..4c9a13d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "SKYBIT-Keyless-Deployment", - "version": "5.0.2", + "version": "6.0.0", "packageManager": "yarn@4.2.2", "devDependencies": { "@SKYBITDev3/ZeframLou-create3-factory": "https://github.com/SKYBITDev3/ZeframLou-create3-factory#3a8db987b8a6e1b63845a0ee1d0206cb4b5748f9", @@ -30,7 +30,7 @@ "ethers": "^6.12.1", "hardhat": "^2.22.4", "hardhat-gas-reporter": "^2.2.0", - "solc": "0.8.24", + "solc": "0.8.26", "solidity-coverage": "^0.8.12", "ts-node": "^10.9.2", "typechain": "^8.3.2", diff --git a/scripts/deployKeylessly-TESTERC20UG.js b/scripts/deployKeylessly-TESTERC20UG.js index 7e3b1f6..c1aa0d5 100644 --- a/scripts/deployKeylessly-TESTERC20UG.js +++ b/scripts/deployKeylessly-TESTERC20UG.js @@ -30,7 +30,7 @@ async function main() { const cfToken = await ethers.getContractFactory(artifactOfContractToDeploy.abi, artifactOfContractToDeploy.bytecode) const bytecodeWithArgs = (await cfToken.getDeployTransaction()).data // no constructor args - const implAddress = await deployKeylessly(contractName, bytecodeWithArgs, gasLimitForImpl, wallet, isDeployEnabled) // gas cost: 3012861 + const implAddress = await deployKeylessly(contractName, bytecodeWithArgs, gasLimitForImpl, wallet, isDeployEnabled) if (implAddress === undefined) return const proxyContractName = `ERC1967Proxy` @@ -41,7 +41,7 @@ async function main() { const proxyBytecodeWithArgs = (await cfProxy.getDeployTransaction(...proxyConstructorArgs)).data - const proxyAddress = await deployKeylessly(proxyContractName, proxyBytecodeWithArgs, gasLimitForProxy, wallet, isDeployEnabled) // gas cost: 378214 + const proxyAddress = await deployKeylessly(proxyContractName, proxyBytecodeWithArgs, gasLimitForProxy, wallet, isDeployEnabled) if (isDeployEnabled) { await upgrades.forceImport(proxyAddress, cfToken) diff --git a/scripts/deployViaCREATE3-TESTERC20.js b/scripts/deployViaCREATE3-TESTERC20.js index 255ee7b..b8db9d9 100644 --- a/scripts/deployViaCREATE3-TESTERC20.js +++ b/scripts/deployViaCREATE3-TESTERC20.js @@ -1,10 +1,10 @@ const { ethers, network } = require(`hardhat`) // CHOOSE WHICH FACTORY YOU WANT TO USE: -// const factoryToUse = { name: `axelarnetwork`, address: `0x95A9323CF0443758df5F3becf3B221cB3D42f3A0` } // gas cost: 1846094 -// const factoryToUse = { name: `ZeframLou`, address: `0x2befaF9234EE4d5b10dDAECF55F73dA87F74Facb` } // gas cost: 1767973 -// const factoryToUse = { name: `SKYBITSolady`, address: `0xF545230eE44735CCDb71325c6D4bC981b444CBb6` } // gas cost: 1743119 -const factoryToUse = { name: `SKYBITLite`, address: `0x739201bA340A675624D9ADb1cc27e68F76a29765` } // gas cost: 1743602 +// const factoryToUse = { name: `axelarnetwork`, address: `0x8cf037a598957EFE440841E256f4CA0056A8219C` } +// const factoryToUse = { name: `ZeframLou`, address: `0x03B583D983aAe5a965dfCC3565F58C9153Af1Be3` } +// const factoryToUse = { name: `SKYBITSolady`, address: `0x5391d63aBd39A43360CE360531f5Ba5c19249030` } +const factoryToUse = { name: `SKYBITLite`, address: `0x739201bA340A675624D9ADb1cc27e68F76a29765` } const isDeployEnabled = true // toggle in case you do deployment and verification separately. diff --git a/scripts/deployViaCREATE3-TESTERC20UG.js b/scripts/deployViaCREATE3-TESTERC20UG.js index 370fddc..3b5de2b 100644 --- a/scripts/deployViaCREATE3-TESTERC20UG.js +++ b/scripts/deployViaCREATE3-TESTERC20UG.js @@ -2,10 +2,10 @@ const { ethers, network, upgrades } = require(`hardhat`) // CHOOSE WHICH FACTORY YOU WANT TO USE: -// const factoryToUse = { name: `axelarnetwork`, address: `0x95A9323CF0443758df5F3becf3B221cB3D42f3A0` } // gas cost: 2413077 + 498930 -// const factoryToUse = { name: `ZeframLou`, address: `0x2befaF9234EE4d5b10dDAECF55F73dA87F74Facb` } // gas cost: 2413077 + 422294 -// const factoryToUse = { name: `SKYBITSolady`, address: `0xF545230eE44735CCDb71325c6D4bC981b444CBb6` } // gas cost: 2413077 + 418479 -const factoryToUse = { name: `SKYBITLite`, address: `0x739201bA340A675624D9ADb1cc27e68F76a29765` } // gas cost: 2413077 + 419071 +// const factoryToUse = { name: `axelarnetwork`, address: `0x8cf037a598957EFE440841E256f4CA0056A8219C` } +// const factoryToUse = { name: `ZeframLou`, address: `0x03B583D983aAe5a965dfCC3565F58C9153Af1Be3` } +// const factoryToUse = { name: `SKYBITSolady`, address: `0x5391d63aBd39A43360CE360531f5Ba5c19249030` } +const factoryToUse = { name: `SKYBITLite`, address: `0x739201bA340A675624D9ADb1cc27e68F76a29765` } const isDeployEnabled = true // toggle in case you do deployment and verification separately. @@ -67,7 +67,7 @@ async function main() { const { getArtifactOfFactory, getDeployedAddress, CREATE3Deploy } = rootRequire(`scripts/CREATE3-deploy-functions.js`) if (isDeployEnabled) { - proxy = await CREATE3Deploy(factoryToUse.name, factoryToUse.address, cfProxy, proxyContractName, proxyConstructorArgs, salt, wallet, isDeployEnabled) // Gas cost: 425068 + proxy = await CREATE3Deploy(factoryToUse.name, factoryToUse.address, cfProxy, proxyContractName, proxyConstructorArgs, salt, wallet, isDeployEnabled) if (proxy === undefined) return proxyAddress = proxy.target diff --git a/yarn.lock b/yarn.lock index 2d75323..745c30d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1639,7 +1639,7 @@ __metadata: ethers: "npm:^6.12.1" hardhat: "npm:^2.22.4" hardhat-gas-reporter: "npm:^2.2.0" - solc: "npm:0.8.24" + solc: "npm:0.8.26" solidity-coverage: "npm:^0.8.12" ts-node: "npm:^10.9.2" typechain: "npm:^8.3.2" @@ -6576,9 +6576,9 @@ __metadata: languageName: node linkType: hard -"solc@npm:0.8.24": - version: 0.8.24 - resolution: "solc@npm:0.8.24" +"solc@npm:0.8.26": + version: 0.8.26 + resolution: "solc@npm:0.8.26" dependencies: command-exists: "npm:^1.2.8" commander: "npm:^8.1.0" @@ -6589,7 +6589,7 @@ __metadata: tmp: "npm:0.0.33" bin: solcjs: solc.js - checksum: 10/e85644370a26a92fbdfb783ce14184fb6291ddd77ff93cc5d70019add63c32ecea9988453d02b27b99cb37f46cc99b88f33321305b3f9a5cacb9b1a6f803b607 + checksum: 10/30ef9c2687f727eb5bdd685c77b1a0b354e7d6ba7a080cfcdce5a89f25a1399ff7949fecef47768088d825588da230da0044b46f056fc36f3959c0e3d3c9a82b languageName: node linkType: hard