Skip to content

Commit

Permalink
Feat : SDK - getContract
Browse files Browse the repository at this point in the history
ethers contracts instance
  • Loading branch information
SonYoungsung committed Jan 12, 2024
1 parent 2464449 commit b0e5d98
Show file tree
Hide file tree
Showing 16 changed files with 7,681 additions and 98 deletions.
2 changes: 1 addition & 1 deletion contracts/data/tonstarter/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"L1StosInL2": "0x5c8ee41536721D2e31352259D3A84419B09d716F",
"L1StosInL2Proxy": "0xa12431D37095CA8e3C04Eb1a4e7cE235718F10bF",
"LockIdNftForRegister": "0x48f60aAf60D5E162b2DebFD4F70c88fE01b7c331",
"LockIdNftForRegisterProxy": "0x4b3fB26396C6740341cB36E2D3325b116342138",
"LockIdNftForRegisterProxy": "0x4b3fB26396C6740341cB36E2D3325b1163421385",
"L2UniversalStos": "0xF9d75D5814e1C3D734342bD5Ed0637b9c49c3f69",
"L2UniversalStosProxy": "0x58B4C2FEf19f5CDdd944AadD8DC99cCC71bfeFDc",
"L2DividendPoolForStos": "0x310AeC1C6Ab68DD1DB4bf9B885835BD73BdEb958",
Expand Down
127 changes: 127 additions & 0 deletions contracts/data/tosv2/abi/LibStaking.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "LibStaking",
"sourceName": "contracts/libraries/LibStaking.sol",
"abi": [
{
"inputs": [
{
"internalType": "uint256",
"name": "principal",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "ratio",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "n",
"type": "uint256"
}
],
"name": "compound",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "lockTos",
"type": "address"
},
{
"internalType": "uint256",
"name": "start",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_periodWeeks",
"type": "uint256"
}
],
"name": "getUnlockTime",
"outputs": [
{
"internalType": "uint256",
"name": "sTosEpochUnit",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "unlockTime",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_runwayTOS",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_totalTOS",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "rebasePerEpoch",
"type": "uint256"
}
],
"name": "possibleEpochNumber",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "int128",
"name": "x",
"type": "int128"
},
{
"internalType": "uint256",
"name": "n",
"type": "uint256"
}
],
"name": "pow",
"outputs": [
{
"internalType": "int128",
"name": "r",
"type": "int128"
}
],
"stateMutability": "pure",
"type": "function"
}
],
"bytecode": "0x6108c961003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100565760003560e01c806343b440821461005b578063ae581bc214610081578063b022e588146100a7578063f3c85eba146100cf575b600080fd5b61006e610069366004610776565b6100e2565b6040519081526020015b60405180910390f35b61009461008f36600461072e565b610166565b604051600f9190910b8152602001610078565b6100ba6100b53660046106ef565b6101c9565b60408051928352602083019190915201610078565b61006e6100dd366004610776565b610274565b6000806101096101046100f587876102af565b6100ff60016102ed565b61030a565b61033e565b905060006829724fe657ff75db8061013461010461012f87670de0b6b3a76400006107a1565b6102ed565b61013e91906107ec565b9050600061015861014f8484610378565b600f0b60401d90565b60070b979650505050505050565b600061017260016102ed565b90505b81156101c357610186600283610853565b600114156101ac5761019881846103de565b90506101a560018361083c565b9150610175565b6101b683846103de565b92506101a56002836107b9565b92915050565b600080846001600160a01b031663fd2dcecf6040518163ffffffff1660e01b815260040160206040518083038186803b15801561020557600080fd5b505afa158015610219573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061023d919061075e565b915061024982846107cd565b61025390856107a1565b90508161026081836107b9565b61026a91906107cd565b9050935093915050565b60006102a76102a161029b61028960016102ed565b6100ff87670de0b6b3a76400006102af565b84610166565b85610414565b949350505050565b6000816102bb57600080fd5b60006102c7848461047c565b905060016001607f1b036001600160801b03821611156102e657600080fd5b9392505050565b600060016001603f1b0382111561030357600080fd5b5060401b90565b6000600f83810b9083900b0160016001607f1b03198112801590610335575060016001607f1b038113155b6102e657600080fd5b60008082600f0b1361034f57600080fd5b608061035a83610615565b600f0b6fb17217f7d1cf79abc9e3b39803f2f6af02901c9050919050565b600081600f0b6000141561038b57600080fd5b600082600f0b604085600f0b901b816103b457634e487b7160e01b600052601260045260246000fd5b05905060016001607f1b03198112801590610335575060016001607f1b038113156102e657600080fd5b6000600f83810b9083900b0260401d60016001607f1b03198112801590610335575060016001607f1b038113156102e657600080fd5b600081610423575060006101c3565b600083600f0b121561043457600080fd5b600f83900b6001600160801b038316810260401c90608084901c026001600160c01b0381111561046357600080fd5b60401b811981111561047457600080fd5b019392505050565b60008161048857600080fd5b60006001600160c01b0384116104c15782604085901b816104b957634e487b7160e01b600052601260045260246000fd5b049050610601565b60c084811c600160201b81106104d9576020918201911c5b6201000081106104eb576010918201911c5b61010081106104fc576008918201911c5b6010811061050c576004918201911c5b6004811061051c576002918201911c5b6002811061052b576001820191505b60bf820360018603901c6001018260ff0387901b8161055a57634e487b7160e01b600052601260045260246000fd5b0492506001600160801b0383111561057157600080fd5b608085901c83026001600160801b038616840260c088901c604089901b8281101561059d576001820391505b608084901b929003828110156105b4576001820391505b829003608084901c82146105d857634e487b7160e01b600052600160045260246000fd5b8881816105f557634e487b7160e01b600052601260045260246000fd5b04870196505050505050505b6001600160801b038111156102e657600080fd5b60008082600f0b1361062657600080fd5b6000600f83900b600160401b8112610640576040918201911d5b600160201b8112610653576020918201911d5b620100008112610665576010918201911d5b6101008112610676576008918201911d5b60108112610686576004918201911d5b60048112610696576002918201911d5b600281126106a5576001820191505b603f19820160401b600f85900b607f8490031b6001603f1b5b60008113156106e45790800260ff81901c8281029390930192607f011c9060011d6106be565b509095945050505050565b600080600060608486031215610703578283fd5b83356001600160a01b0381168114610719578384fd5b95602085013595506040909401359392505050565b60008060408385031215610740578182fd5b823580600f0b8114610750578283fd5b946020939093013593505050565b60006020828403121561076f578081fd5b5051919050565b60008060006060848603121561078a578283fd5b505081359360208301359350604090920135919050565b600082198211156107b4576107b4610867565b500190565b6000826107c8576107c861087d565b500490565b60008160001904831182151516156107e7576107e7610867565b500290565b6000600f82810b9084900b828112801560016001607f1b031983018412161561081757610817610867565b60016001607f1b038201831381161561083257610832610867565b5090039392505050565b60008282101561084e5761084e610867565b500390565b6000826108625761086261087d565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fdfea26469706673582212200eda2c7a208da652f53ccc36a71a5eb79ed4fb1f4e6d17369004ed73c5495c7664736f6c63430008040033",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100565760003560e01c806343b440821461005b578063ae581bc214610081578063b022e588146100a7578063f3c85eba146100cf575b600080fd5b61006e610069366004610776565b6100e2565b6040519081526020015b60405180910390f35b61009461008f36600461072e565b610166565b604051600f9190910b8152602001610078565b6100ba6100b53660046106ef565b6101c9565b60408051928352602083019190915201610078565b61006e6100dd366004610776565b610274565b6000806101096101046100f587876102af565b6100ff60016102ed565b61030a565b61033e565b905060006829724fe657ff75db8061013461010461012f87670de0b6b3a76400006107a1565b6102ed565b61013e91906107ec565b9050600061015861014f8484610378565b600f0b60401d90565b60070b979650505050505050565b600061017260016102ed565b90505b81156101c357610186600283610853565b600114156101ac5761019881846103de565b90506101a560018361083c565b9150610175565b6101b683846103de565b92506101a56002836107b9565b92915050565b600080846001600160a01b031663fd2dcecf6040518163ffffffff1660e01b815260040160206040518083038186803b15801561020557600080fd5b505afa158015610219573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061023d919061075e565b915061024982846107cd565b61025390856107a1565b90508161026081836107b9565b61026a91906107cd565b9050935093915050565b60006102a76102a161029b61028960016102ed565b6100ff87670de0b6b3a76400006102af565b84610166565b85610414565b949350505050565b6000816102bb57600080fd5b60006102c7848461047c565b905060016001607f1b036001600160801b03821611156102e657600080fd5b9392505050565b600060016001603f1b0382111561030357600080fd5b5060401b90565b6000600f83810b9083900b0160016001607f1b03198112801590610335575060016001607f1b038113155b6102e657600080fd5b60008082600f0b1361034f57600080fd5b608061035a83610615565b600f0b6fb17217f7d1cf79abc9e3b39803f2f6af02901c9050919050565b600081600f0b6000141561038b57600080fd5b600082600f0b604085600f0b901b816103b457634e487b7160e01b600052601260045260246000fd5b05905060016001607f1b03198112801590610335575060016001607f1b038113156102e657600080fd5b6000600f83810b9083900b0260401d60016001607f1b03198112801590610335575060016001607f1b038113156102e657600080fd5b600081610423575060006101c3565b600083600f0b121561043457600080fd5b600f83900b6001600160801b038316810260401c90608084901c026001600160c01b0381111561046357600080fd5b60401b811981111561047457600080fd5b019392505050565b60008161048857600080fd5b60006001600160c01b0384116104c15782604085901b816104b957634e487b7160e01b600052601260045260246000fd5b049050610601565b60c084811c600160201b81106104d9576020918201911c5b6201000081106104eb576010918201911c5b61010081106104fc576008918201911c5b6010811061050c576004918201911c5b6004811061051c576002918201911c5b6002811061052b576001820191505b60bf820360018603901c6001018260ff0387901b8161055a57634e487b7160e01b600052601260045260246000fd5b0492506001600160801b0383111561057157600080fd5b608085901c83026001600160801b038616840260c088901c604089901b8281101561059d576001820391505b608084901b929003828110156105b4576001820391505b829003608084901c82146105d857634e487b7160e01b600052600160045260246000fd5b8881816105f557634e487b7160e01b600052601260045260246000fd5b04870196505050505050505b6001600160801b038111156102e657600080fd5b60008082600f0b1361062657600080fd5b6000600f83900b600160401b8112610640576040918201911d5b600160201b8112610653576020918201911d5b620100008112610665576010918201911d5b6101008112610676576008918201911d5b60108112610686576004918201911d5b60048112610696576002918201911d5b600281126106a5576001820191505b603f19820160401b600f85900b607f8490031b6001603f1b5b60008113156106e45790800260ff81901c8281029390930192607f011c9060011d6106be565b509095945050505050565b600080600060608486031215610703578283fd5b83356001600160a01b0381168114610719578384fd5b95602085013595506040909401359392505050565b60008060408385031215610740578182fd5b823580600f0b8114610750578283fd5b946020939093013593505050565b60006020828403121561076f578081fd5b5051919050565b60008060006060848603121561078a578283fd5b505081359360208301359350604090920135919050565b600082198211156107b4576107b4610867565b500190565b6000826107c8576107c861087d565b500490565b60008160001904831182151516156107e7576107e7610867565b500290565b6000600f82810b9084900b828112801560016001607f1b031983018412161561081757610817610867565b60016001607f1b038201831381161561083257610832610867565b5090039392505050565b60008282101561084e5761084e610867565b500390565b6000826108625761086261087d565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fdfea26469706673582212200eda2c7a208da652f53ccc36a71a5eb79ed4fb1f4e6d17369004ed73c5495c7664736f6c63430008040033",
"linkReferences": {},
"deployedLinkReferences": {}
}
30 changes: 30 additions & 0 deletions contracts/data/tosv2/abi/LibTreasury.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "LibTreasury",
"sourceName": "contracts/libraries/LibTreasury.sol",
"abi": [
{
"inputs": [
{
"internalType": "uint256",
"name": "role",
"type": "uint256"
}
],
"name": "getSatatus",
"outputs": [
{
"internalType": "enum LibTreasury.STATUS",
"name": "_status",
"type": "LibTreasury.STATUS"
}
],
"stateMutability": "pure",
"type": "function"
}
],
"bytecode": "0x61018d61003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100355760003560e01c8063a273ca221461003a575b600080fd5b61004d610048366004610117565b610063565b60405161005a919061012f565b60405180910390f35b6000600182141561007657506001919050565b600282141561008757506002919050565b600382141561009857506003919050565b60048214156100a957506004919050565b60058214156100ba57506005919050565b60068214156100cb57506006919050565b60078214156100dc57506007919050565b60088214156100ed57506008919050565b60098214156100fe57506009919050565b600a82141561010f5750600a919050565b506000919050565b600060208284031215610128578081fd5b5035919050565b60208101600b831061015157634e487b7160e01b600052602160045260246000fd5b9190529056fea2646970667358221220203bbb7e42af0260e350e4e78bf7ede2123661d11df3a79439060c68b62c25b164736f6c63430008040033",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100355760003560e01c8063a273ca221461003a575b600080fd5b61004d610048366004610117565b610063565b60405161005a919061012f565b60405180910390f35b6000600182141561007657506001919050565b600282141561008757506002919050565b600382141561009857506003919050565b60048214156100a957506004919050565b60058214156100ba57506005919050565b60068214156100cb57506006919050565b60078214156100dc57506007919050565b60088214156100ed57506008919050565b60098214156100fe57506009919050565b600a82141561010f5750600a919050565b506000919050565b600060208284031215610128578081fd5b5035919050565b60208101600b831061015157634e487b7160e01b600052602160045260246000fd5b9190529056fea2646970667358221220203bbb7e42af0260e350e4e78bf7ede2123661d11df3a79439060c68b62c25b164736f6c63430008040033",
"linkReferences": {},
"deployedLinkReferences": {}
}
Loading

0 comments on commit b0e5d98

Please sign in to comment.