forked from ExocoreNetwork/exocore
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feat] Register chains and tokens through precompile (ExocoreNetwork#116
) * add register client chain and tokens in precompile * fix the issues identified by code review in#PR116 * finalized the precompile for token and client chain registeration * rename RegisterTokens to RegisterToken and fix the check for the *big.int in the precompile * update go-getter to fix the go vulnerability
- Loading branch information
1 parent
106fb18
commit 13c0a1b
Showing
31 changed files
with
799 additions
and
358 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,98 +1,190 @@ | ||
[ | ||
{ | ||
"type": "function", | ||
"name": "depositTo", | ||
"inputs": [ | ||
"inputs": | ||
[ | ||
{ | ||
"name": "clientChainLzID", | ||
"type": "uint32", | ||
"internalType": "uint32" | ||
"internalType": "uint32", | ||
"name": "clientChainID", | ||
"type": "uint32" | ||
}, | ||
{ | ||
"internalType": "bytes", | ||
"name": "assetsAddress", | ||
"type": "bytes", | ||
"internalType": "bytes" | ||
"type": "bytes" | ||
}, | ||
{ | ||
"internalType": "bytes", | ||
"name": "stakerAddress", | ||
"type": "bytes", | ||
"internalType": "bytes" | ||
"type": "bytes" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "opAmount", | ||
"type": "uint256", | ||
"internalType": "uint256" | ||
"type": "uint256" | ||
} | ||
], | ||
"outputs": [ | ||
"name": "depositTo", | ||
"outputs": | ||
[ | ||
{ | ||
"internalType": "bool", | ||
"name": "success", | ||
"type": "bool", | ||
"internalType": "bool" | ||
"type": "bool" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "latestAssetState", | ||
"type": "uint256", | ||
"internalType": "uint256" | ||
"type": "uint256" | ||
} | ||
], | ||
"stateMutability": "nonpayable" | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "getClientChains", | ||
"inputs": [], | ||
"outputs": [ | ||
"name": "getClientChains", | ||
"outputs": | ||
[ | ||
{ | ||
"internalType": "bool", | ||
"name": "", | ||
"type": "bool", | ||
"internalType": "bool" | ||
"type": "bool" | ||
}, | ||
{ | ||
"internalType": "uint32[]", | ||
"name": "", | ||
"type": "uint32[]", | ||
"internalType": "uint32[]" | ||
"type": "uint32[]" | ||
} | ||
], | ||
"stateMutability": "view" | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "withdrawPrincipal", | ||
"inputs": [ | ||
"inputs": | ||
[ | ||
{ | ||
"internalType": "uint32", | ||
"name": "clientChainID", | ||
"type": "uint32" | ||
}, | ||
{ | ||
"internalType": "uint8", | ||
"name": "addressLength", | ||
"type": "uint8" | ||
}, | ||
{ | ||
"internalType": "string", | ||
"name": "name", | ||
"type": "string" | ||
}, | ||
{ | ||
"internalType": "string", | ||
"name": "metaInfo", | ||
"type": "string" | ||
}, | ||
{ | ||
"internalType": "string", | ||
"name": "signatureType", | ||
"type": "string" | ||
} | ||
], | ||
"name": "registerClientChain", | ||
"outputs": | ||
[ | ||
{ | ||
"internalType": "bool", | ||
"name": "success", | ||
"type": "bool" | ||
} | ||
], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": | ||
[ | ||
{ | ||
"internalType": "uint32", | ||
"name": "clientChainID", | ||
"type": "uint32" | ||
}, | ||
{ | ||
"name": "clientChainLzID", | ||
"type": "uint32", | ||
"internalType": "uint32" | ||
"internalType": "bytes", | ||
"name": "token", | ||
"type": "bytes" | ||
}, | ||
{ | ||
"internalType": "uint8", | ||
"name": "decimals", | ||
"type": "uint8" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "tvlLimit", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"internalType": "string", | ||
"name": "name", | ||
"type": "string" | ||
}, | ||
{ | ||
"internalType": "string", | ||
"name": "metaData", | ||
"type": "string" | ||
} | ||
], | ||
"name": "registerToken", | ||
"outputs": | ||
[ | ||
{ | ||
"internalType": "bool", | ||
"name": "success", | ||
"type": "bool" | ||
} | ||
], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": | ||
[ | ||
{ | ||
"internalType": "uint32", | ||
"name": "clientChainID", | ||
"type": "uint32" | ||
}, | ||
{ | ||
"internalType": "bytes", | ||
"name": "assetsAddress", | ||
"type": "bytes", | ||
"internalType": "bytes" | ||
"type": "bytes" | ||
}, | ||
{ | ||
"internalType": "bytes", | ||
"name": "withdrawAddress", | ||
"type": "bytes", | ||
"internalType": "bytes" | ||
"type": "bytes" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "opAmount", | ||
"type": "uint256", | ||
"internalType": "uint256" | ||
"type": "uint256" | ||
} | ||
], | ||
"outputs": [ | ||
"name": "withdrawPrincipal", | ||
"outputs": | ||
[ | ||
{ | ||
"internalType": "bool", | ||
"name": "success", | ||
"type": "bool", | ||
"internalType": "bool" | ||
"type": "bool" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "latestAssetState", | ||
"type": "uint256", | ||
"internalType": "uint256" | ||
"type": "uint256" | ||
} | ||
], | ||
"stateMutability": "nonpayable" | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
} | ||
] | ||
] |
Oops, something went wrong.