Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
link33
plugin
Commits
a517c50d
Commit
a517c50d
authored
Dec 08, 2021
by
hezhengjun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support decimal set for erc20
parent
51797b6c
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
60 additions
and
33 deletions
+60
-33
Makefile
plugin/dapp/cross2eth/contracts/Makefile
+5
-0
ERC20.sol
plugin/dapp/cross2eth/contracts/erc20/ERC20.sol
+4
-2
erc20.go
plugin/dapp/cross2eth/contracts/erc20/generated/erc20.go
+4
-4
ethereumRelayerCmd.go
plugin/dapp/cross2eth/ebcli/ethereumRelayerCmd.go
+9
-0
relayer.proto
plugin/dapp/cross2eth/ebrelayer/proto/relayer.proto
+1
-0
ethereum.go
plugin/dapp/cross2eth/ebrelayer/relayer/ethereum/ethereum.go
+2
-2
deploy.go
...app/cross2eth/ebrelayer/relayer/ethereum/ethtxs/deploy.go
+2
-2
manager.go
plugin/dapp/cross2eth/ebrelayer/relayer/manager.go
+1
-1
relayer.pb.go
plugin/dapp/cross2eth/ebrelayer/types/relayer.pb.go
+32
-22
No files found.
plugin/dapp/cross2eth/contracts/Makefile
View file @
a517c50d
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
##编译solidity,并产生bin文件,abi文件,和相应的go文件
##编译solidity,并产生bin文件,abi文件,和相应的go文件
SRC_BEP
:=
bep20
SRC_BEP
:=
bep20
SRC_ERC20
:=
erc20
SRC_CONTRACT0
:=
contracts4chain33
SRC_CONTRACT0
:=
contracts4chain33
SRC_CONTRACT1
:=
contracts4eth
SRC_CONTRACT1
:=
contracts4eth
SRC_MULTISIGN
:=
gnosis/safe-contracts/contracts
SRC_MULTISIGN
:=
gnosis/safe-contracts/contracts
...
@@ -10,6 +11,7 @@ GO_OUT0 := ${SRC_CONTRACT0}/generated
...
@@ -10,6 +11,7 @@ GO_OUT0 := ${SRC_CONTRACT0}/generated
GO_OUT1
:=
${
SRC_CONTRACT1
}
/generated
GO_OUT1
:=
${
SRC_CONTRACT1
}
/generated
GO_OUT_MULTISIGN
:=
gnosis/generated
GO_OUT_MULTISIGN
:=
gnosis/generated
GO_OUT_BEP20
:=
bep20/generated
GO_OUT_BEP20
:=
bep20/generated
GO_OUT_ERC20
:=
erc20/generated
PACKAGE
:=
generated
PACKAGE
:=
generated
proj
:=
"build"
proj
:=
"build"
...
@@ -30,6 +32,9 @@ multisign:
...
@@ -30,6 +32,9 @@ multisign:
bep20Bin
:
bep20Bin
:
@
abigen
--sol
$(SRC_BEP)
/BEP20.sol
--pkg
$(PACKAGE)
--out
$(GO_OUT_BEP20)
/bep20.go
@
abigen
--sol
$(SRC_BEP)
/BEP20.sol
--pkg
$(PACKAGE)
--out
$(GO_OUT_BEP20)
/bep20.go
erc20Bin
:
@
abigen
--sol
$(SRC_ERC20)
/ERC20.sol
--pkg
$(PACKAGE)
--out
$(GO_OUT_ERC20)
/erc20.go
clean
:
clean
:
@
rm
-fr
$(GO_OUT)
/
*
@
rm
-fr
$(GO_OUT)
/
*
...
...
plugin/dapp/cross2eth/contracts/erc20/ERC20.sol
View file @
a517c50d
...
@@ -15,6 +15,7 @@ contract ERC20 is Context, IERC20 {
...
@@ -15,6 +15,7 @@ contract ERC20 is Context, IERC20 {
string private _name;
string private _name;
string private _symbol;
string private _symbol;
uint8 private _decimals;
/**
/**
* @dev Sets the values for {name} and {symbol}.
* @dev Sets the values for {name} and {symbol}.
...
@@ -25,10 +26,11 @@ contract ERC20 is Context, IERC20 {
...
@@ -25,10 +26,11 @@ contract ERC20 is Context, IERC20 {
* All three of these values are immutable: they can only be set once during
* All three of these values are immutable: they can only be set once during
* construction.
* construction.
*/
*/
constructor (string memory name_, string memory symbol_,uint256 supply, address owner
) {
constructor (string memory name_, string memory symbol_,uint256 supply, address owner
, uint8 decimals_) {
_name = name_;
_name = name_;
_symbol = symbol_;
_symbol = symbol_;
_totalSupply=supply;
_totalSupply=supply;
_decimals = decimals_;
_balances[owner] = supply;
_balances[owner] = supply;
}
}
...
@@ -61,7 +63,7 @@ contract ERC20 is Context, IERC20 {
...
@@ -61,7 +63,7 @@ contract ERC20 is Context, IERC20 {
* {IERC20-balanceOf} and {IERC20-transfer}.
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
*/
function decimals() public view virtual returns (uint8) {
function decimals() public view virtual returns (uint8) {
return
8;
return
_decimals;
}
}
/**
/**
...
...
plugin/dapp/cross2eth/contracts/erc20/generated/
ERC
20.go
→
plugin/dapp/cross2eth/contracts/erc20/generated/
erc
20.go
View file @
a517c50d
...
@@ -172,7 +172,7 @@ func (_Context *ContextTransactorRaw) Transact(opts *bind.TransactOpts, method s
...
@@ -172,7 +172,7 @@ func (_Context *ContextTransactorRaw) Transact(opts *bind.TransactOpts, method s
}
}
// ERC20ABI is the input ABI used to generate the binding from.
// ERC20ABI is the input ABI used to generate the binding from.
const
ERC20ABI
=
"[{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
name_
\"
,
\"
type
\"
:
\"
string
\"
},{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
symbol_
\"
,
\"
type
\"
:
\"
string
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
supply
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
owner
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
constructor
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
owner
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
spender
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
value
\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
name
\"
:
\"
Approval
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
from
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
to
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
value
\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
name
\"
:
\"
Transfer
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
owner
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
spender
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
name
\"
:
\"
allowance
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
spender
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
amount
\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
name
\"
:
\"
approve
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
bool
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
bool
\"
}],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
account
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
name
\"
:
\"
balanceOf
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
decimals
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint8
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint8
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
spender
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
subtractedValue
\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
name
\"
:
\"
decreaseAllowance
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
bool
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
bool
\"
}],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
spender
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
addedValue
\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
name
\"
:
\"
increaseAllowance
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
bool
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
bool
\"
}],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
name
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
string
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
symbol
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
string
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
totalSupply
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
recipient
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
amount
\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
name
\"
:
\"
transfer
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
bool
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
bool
\"
}],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
sender
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
recipient
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
amount
\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
name
\"
:
\"
transferFrom
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
bool
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
bool
\"
}],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
}]"
const
ERC20ABI
=
"[{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
name_
\"
,
\"
type
\"
:
\"
string
\"
},{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
symbol_
\"
,
\"
type
\"
:
\"
string
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
supply
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
owner
\"
,
\"
type
\"
:
\"
address
\"
}
,{
\"
internalType
\"
:
\"
uint8
\"
,
\"
name
\"
:
\"
decimals_
\"
,
\"
type
\"
:
\"
uint8
\"
}
],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
constructor
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
owner
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
spender
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
value
\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
name
\"
:
\"
Approval
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
from
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
to
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
value
\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
name
\"
:
\"
Transfer
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
owner
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
spender
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
name
\"
:
\"
allowance
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
spender
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
amount
\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
name
\"
:
\"
approve
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
bool
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
bool
\"
}],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
account
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
name
\"
:
\"
balanceOf
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
decimals
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint8
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint8
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
spender
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
subtractedValue
\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
name
\"
:
\"
decreaseAllowance
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
bool
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
bool
\"
}],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
spender
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
addedValue
\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
name
\"
:
\"
increaseAllowance
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
bool
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
bool
\"
}],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
name
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
string
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
symbol
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
string
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
totalSupply
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
recipient
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
amount
\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
name
\"
:
\"
transfer
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
bool
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
bool
\"
}],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
sender
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
recipient
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
amount
\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
name
\"
:
\"
transferFrom
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
bool
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
bool
\"
}],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
}]"
// ERC20FuncSigs maps the 4-byte function signature to its string representation.
// ERC20FuncSigs maps the 4-byte function signature to its string representation.
var
ERC20FuncSigs
=
map
[
string
]
string
{
var
ERC20FuncSigs
=
map
[
string
]
string
{
...
@@ -190,16 +190,16 @@ var ERC20FuncSigs = map[string]string{
...
@@ -190,16 +190,16 @@ var ERC20FuncSigs = map[string]string{
}
}
// ERC20Bin is the compiled bytecode used for deploying new contracts.
// ERC20Bin is the compiled bytecode used for deploying new contracts.
var
ERC20Bin
=
"0x608060405234801561001057600080fd5b50604051610b
d1380380610bd18339818101604052608081101561003357600080fd5b810190808051604051939291908464010000000082111561005357600080fd5b90830190602082018581111561006857600080fd5b825164010000000081118282018810171561008257600080fd5b82525081516020918201929091019080838360005b838110156100af578181015183820152602001610097565b50505050905090810190601f1680156100dc5780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156100ff57600080fd5b90830190602082018581111561011457600080fd5b825164010000000081118282018810171561012e57600080fd5b82525081516020918201929091019080838360005b8381101561015b578181015183820152602001610143565b50505050905090810190601f1680156101885780820380516001836020036101000a031916815260200191505b5060409081526020828101519290910151865192945092506101af916003918701906101e9565b5082516101c39060049060208601906101e9565b5060028290556001600160a01b03166000908152602081905260409020555061027c9050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061022a57805160ff1916838001178555610257565b82800160010185558215610257579182015b8281111561025757825182559160200191906001019061023c565b50610263929150610267565b5090565b5b808211156102635760008155600101610268565b6109468061028b6000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c8063395093511161007157806339509351146101d957806370a082311461020557806395d89b411461022b578063a457c2d714610233578063a9059cbb1461025f578063dd62ed3e1461028b576100a9565b806306fdde03146100ae578063095ea7b31461012b57806318160ddd1461016b57806323b872dd14610185578063313ce567146101bb575b600080fd5b6100b66102b9565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100f05781810151838201526020016100d8565b50505050905090810190601f16801561011d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101576004803603604081101561014157600080fd5b506001600160a01b03813516906020013561034f565b604080519115158252519081900360200190f35b61017361036c565b60408051918252519081900360200190f35b6101576004803603606081101561019b57600080fd5b506001600160a01b03813581169160208101359091169060400135610372565b6101c3610421565b6040805160ff9092168252519081900360200190f35b610157600480360360408110156101ef57600080fd5b506001600160a01b038135169060200135610426565b6101736004803603602081101561021b57600080fd5b50356001600160a01b0316610471565b6100b661048c565b6101576004803603604081101561024957600080fd5b506001600160a01b0381351690602001356104ed565b6101576004803603604081101561027557600080fd5b506001600160a01b038135169060200135610585565b610173600480360360408110156102a157600080fd5b506001600160a01b0381358116916020013516610599565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103455780601f1061031a57610100808354040283529160200191610345565b820191906000526020600020905b81548152906001019060200180831161032857829003601f168201915b5050505050905090565b600061036361035c6105c4565b84846105c8565b50600192915050565b60025490565b600061037f8484846106b4565b6001600160a01b0384166000908152600160205260408120816103a06105c4565b6001600160a01b03166001600160a01b03168152602001908152602001600020549050828110156104025760405162461bcd60e51b815260040180806020018281038252602881526020018061087b6028913960400191505060405180910390fd5b6104168561040e6105c4565b8584036105c8565b506001949350505050565b600890565b60006103636104336105c4565b8484600160006104416105c4565b6001600160a01b03908116825260208083019390935260409182016000908120918b1681529252902054016105c8565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103455780601f1061031a57610100808354040283529160200191610345565b600080600160006104fc6105c4565b6001600160a01b03908116825260208083019390935260409182016000908120918816815292529020549050828110156105675760405162461bcd60e51b81526004018080602001828103825260258152602001806108ec6025913960400191505060405180910390fd5b61057b6105726105c4565b858584036105c8565b5060019392505050565b60006103636105926105c4565b84846106b4565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060d5760405162461bcd60e51b81526004018080602001828103825260248152602001806108c86024913960400191505060405180910390fd5b6001600160a01b0382166106525760405162461bcd60e51b81526004018080602001828103825260228152602001806108336022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f95760405162461bcd60e51b81526004018080602001828103825260258152602001806108a36025913960400191505060405180910390fd5b6001600160a01b03821661073e5760405162461bcd60e51b81526004018080602001828103825260238152602001806108106023913960400191505060405180910390fd5b61074983838361080a565b6001600160a01b038316600090815260208190526040902054818110156107a15760405162461bcd60e51b81526004018080602001828103825260268152602001806108556026913960400191505060405180910390fd5b6001600160a01b038085166000818152602081815260408083208787039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a350505050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220bb703c9c726f60b54cd16fcdcf459351563c86ad2912372653cf90c5760d2a3c
64736f6c63430007030033"
var
ERC20Bin
=
"0x608060405234801561001057600080fd5b50604051610b
ef380380610bef833981810160405260a081101561003357600080fd5b810190808051604051939291908464010000000082111561005357600080fd5b90830190602082018581111561006857600080fd5b825164010000000081118282018810171561008257600080fd5b82525081516020918201929091019080838360005b838110156100af578181015183820152602001610097565b50505050905090810190601f1680156100dc5780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156100ff57600080fd5b90830190602082018581111561011457600080fd5b825164010000000081118282018810171561012e57600080fd5b82525081516020918201929091019080838360005b8381101561015b578181015183820152602001610143565b50505050905090810190601f1680156101885780820380516001836020036101000a031916815260200191505b5060409081526020828101519183015160609093015187519295509293506101b591600391880190610203565b5083516101c9906004906020870190610203565b5060028390556005805460ff191660ff929092169190911790556001600160a01b0316600090815260208190526040902055506102969050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061024457805160ff1916838001178555610271565b82800160010185558215610271579182015b82811115610271578251825591602001919060010190610256565b5061027d929150610281565b5090565b5b8082111561027d5760008155600101610282565b61094a806102a56000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c8063395093511161007157806339509351146101d957806370a082311461020557806395d89b411461022b578063a457c2d714610233578063a9059cbb1461025f578063dd62ed3e1461028b576100a9565b806306fdde03146100ae578063095ea7b31461012b57806318160ddd1461016b57806323b872dd14610185578063313ce567146101bb575b600080fd5b6100b66102b9565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100f05781810151838201526020016100d8565b50505050905090810190601f16801561011d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101576004803603604081101561014157600080fd5b506001600160a01b03813516906020013561034f565b604080519115158252519081900360200190f35b61017361036c565b60408051918252519081900360200190f35b6101576004803603606081101561019b57600080fd5b506001600160a01b03813581169160208101359091169060400135610372565b6101c3610421565b6040805160ff9092168252519081900360200190f35b610157600480360360408110156101ef57600080fd5b506001600160a01b03813516906020013561042a565b6101736004803603602081101561021b57600080fd5b50356001600160a01b0316610475565b6100b6610490565b6101576004803603604081101561024957600080fd5b506001600160a01b0381351690602001356104f1565b6101576004803603604081101561027557600080fd5b506001600160a01b038135169060200135610589565b610173600480360360408110156102a157600080fd5b506001600160a01b038135811691602001351661059d565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103455780601f1061031a57610100808354040283529160200191610345565b820191906000526020600020905b81548152906001019060200180831161032857829003601f168201915b5050505050905090565b600061036361035c6105c8565b84846105cc565b50600192915050565b60025490565b600061037f8484846106b8565b6001600160a01b0384166000908152600160205260408120816103a06105c8565b6001600160a01b03166001600160a01b03168152602001908152602001600020549050828110156104025760405162461bcd60e51b815260040180806020018281038252602881526020018061087f6028913960400191505060405180910390fd5b6104168561040e6105c8565b8584036105cc565b506001949350505050565b60055460ff1690565b60006103636104376105c8565b8484600160006104456105c8565b6001600160a01b03908116825260208083019390935260409182016000908120918b1681529252902054016105cc565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103455780601f1061031a57610100808354040283529160200191610345565b600080600160006105006105c8565b6001600160a01b039081168252602080830193909352604091820160009081209188168152925290205490508281101561056b5760405162461bcd60e51b81526004018080602001828103825260258152602001806108f06025913960400191505060405180910390fd5b61057f6105766105c8565b858584036105cc565b5060019392505050565b60006103636105966105c8565b84846106b8565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b0383166106115760405162461bcd60e51b81526004018080602001828103825260248152602001806108cc6024913960400191505060405180910390fd5b6001600160a01b0382166106565760405162461bcd60e51b81526004018080602001828103825260228152602001806108376022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106fd5760405162461bcd60e51b81526004018080602001828103825260258152602001806108a76025913960400191505060405180910390fd5b6001600160a01b0382166107425760405162461bcd60e51b81526004018080602001828103825260238152602001806108146023913960400191505060405180910390fd5b61074d83838361080e565b6001600160a01b038316600090815260208190526040902054818110156107a55760405162461bcd60e51b81526004018080602001828103825260268152602001806108596026913960400191505060405180910390fd5b6001600160a01b038085166000818152602081815260408083208787039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a350505050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220a76db73049f948a1731f127a763d671c623beb64c13e39a155f8ce564fe19c88
64736f6c63430007030033"
// DeployERC20 deploys a new Ethereum contract, binding an instance of ERC20 to it.
// DeployERC20 deploys a new Ethereum contract, binding an instance of ERC20 to it.
func
DeployERC20
(
auth
*
bind
.
TransactOpts
,
backend
bind
.
ContractBackend
,
name_
string
,
symbol_
string
,
supply
*
big
.
Int
,
owner
common
.
Address
)
(
common
.
Address
,
*
types
.
Transaction
,
*
ERC20
,
error
)
{
func
DeployERC20
(
auth
*
bind
.
TransactOpts
,
backend
bind
.
ContractBackend
,
name_
string
,
symbol_
string
,
supply
*
big
.
Int
,
owner
common
.
Address
,
decimals_
uint8
)
(
common
.
Address
,
*
types
.
Transaction
,
*
ERC20
,
error
)
{
parsed
,
err
:=
abi
.
JSON
(
strings
.
NewReader
(
ERC20ABI
))
parsed
,
err
:=
abi
.
JSON
(
strings
.
NewReader
(
ERC20ABI
))
if
err
!=
nil
{
if
err
!=
nil
{
return
common
.
Address
{},
nil
,
nil
,
err
return
common
.
Address
{},
nil
,
nil
,
err
}
}
address
,
tx
,
contract
,
err
:=
bind
.
DeployContract
(
auth
,
parsed
,
common
.
FromHex
(
ERC20Bin
),
backend
,
name_
,
symbol_
,
supply
,
owner
)
address
,
tx
,
contract
,
err
:=
bind
.
DeployContract
(
auth
,
parsed
,
common
.
FromHex
(
ERC20Bin
),
backend
,
name_
,
symbol_
,
supply
,
owner
,
decimals_
)
if
err
!=
nil
{
if
err
!=
nil
{
return
common
.
Address
{},
nil
,
nil
,
err
return
common
.
Address
{},
nil
,
nil
,
err
}
}
...
...
plugin/dapp/cross2eth/ebcli/ethereumRelayerCmd.go
View file @
a517c50d
...
@@ -312,6 +312,8 @@ func DeployERC20Flags(cmd *cobra.Command) {
...
@@ -312,6 +312,8 @@ func DeployERC20Flags(cmd *cobra.Command) {
_
=
cmd
.
MarkFlagRequired
(
"symbol"
)
_
=
cmd
.
MarkFlagRequired
(
"symbol"
)
cmd
.
Flags
()
.
StringP
(
"amount"
,
"m"
,
"0"
,
"amount"
)
cmd
.
Flags
()
.
StringP
(
"amount"
,
"m"
,
"0"
,
"amount"
)
_
=
cmd
.
MarkFlagRequired
(
"amount"
)
_
=
cmd
.
MarkFlagRequired
(
"amount"
)
cmd
.
Flags
()
.
Uint8P
(
"decimals"
,
"d"
,
8
,
"default set to 8, and can't be greater than 18"
)
}
}
func
DeployERC20
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
func
DeployERC20
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
...
@@ -320,12 +322,19 @@ func DeployERC20(cmd *cobra.Command, args []string) {
...
@@ -320,12 +322,19 @@ func DeployERC20(cmd *cobra.Command, args []string) {
name
,
_
:=
cmd
.
Flags
()
.
GetString
(
"name"
)
name
,
_
:=
cmd
.
Flags
()
.
GetString
(
"name"
)
symbol
,
_
:=
cmd
.
Flags
()
.
GetString
(
"symbol"
)
symbol
,
_
:=
cmd
.
Flags
()
.
GetString
(
"symbol"
)
amount
,
_
:=
cmd
.
Flags
()
.
GetString
(
"amount"
)
amount
,
_
:=
cmd
.
Flags
()
.
GetString
(
"amount"
)
decimals
,
_
:=
cmd
.
Flags
()
.
GetUint8
(
"decimals"
)
if
decimals
>
18
{
fmt
.
Println
(
"decimals can't be greater than 18"
)
return
}
para
:=
ebTypes
.
ERC20Token
{
para
:=
ebTypes
.
ERC20Token
{
Owner
:
owner
,
Owner
:
owner
,
Name
:
name
,
Name
:
name
,
Symbol
:
symbol
,
Symbol
:
symbol
,
Amount
:
amount
,
Amount
:
amount
,
Decimals
:
int32
(
decimals
),
}
}
var
res
rpctypes
.
Reply
var
res
rpctypes
.
Reply
ctx
:=
jsonclient
.
NewRPCCtx
(
rpcLaddr
,
"Manager.DeployERC20"
,
para
,
&
res
)
ctx
:=
jsonclient
.
NewRPCCtx
(
rpcLaddr
,
"Manager.DeployERC20"
,
para
,
&
res
)
...
...
plugin/dapp/cross2eth/ebrelayer/proto/relayer.proto
View file @
a517c50d
...
@@ -222,6 +222,7 @@ message ERC20Token {
...
@@ -222,6 +222,7 @@ message ERC20Token {
string
name
=
2
;
string
name
=
2
;
string
symbol
=
3
;
string
symbol
=
3
;
string
amount
=
4
;
string
amount
=
4
;
int32
decimals
=
5
;
}
}
message
ETHTokenLockAddress
{
message
ETHTokenLockAddress
{
...
...
plugin/dapp/cross2eth/ebrelayer/relayer/ethereum/ethereum.go
View file @
a517c50d
...
@@ -332,12 +332,12 @@ func (ethRelayer *Relayer4Ethereum) AddToken2LockList(symbol, token string) (str
...
@@ -332,12 +332,12 @@ func (ethRelayer *Relayer4Ethereum) AddToken2LockList(symbol, token string) (str
}
}
//DeployERC20 ...
//DeployERC20 ...
func
(
ethRelayer
*
Relayer4Ethereum
)
DeployERC20
(
ownerAddr
,
name
,
symbol
,
amount
string
)
(
string
,
error
)
{
func
(
ethRelayer
*
Relayer4Ethereum
)
DeployERC20
(
ownerAddr
,
name
,
symbol
,
amount
string
,
decimals
uint8
)
(
string
,
error
)
{
bn
:=
big
.
NewInt
(
1
)
bn
:=
big
.
NewInt
(
1
)
bn
,
_
=
bn
.
SetString
(
utils
.
TrimZeroAndDot
(
amount
),
10
)
bn
,
_
=
bn
.
SetString
(
utils
.
TrimZeroAndDot
(
amount
),
10
)
ethRelayer
.
rwLock
.
RLock
()
ethRelayer
.
rwLock
.
RLock
()
defer
ethRelayer
.
rwLock
.
RUnlock
()
defer
ethRelayer
.
rwLock
.
RUnlock
()
return
ethtxs
.
DeployERC20
(
ownerAddr
,
name
,
symbol
,
bn
,
ethRelayer
.
clientSpec
,
ethRelayer
.
operatorInfo
)
return
ethtxs
.
DeployERC20
(
ownerAddr
,
name
,
symbol
,
bn
,
decimals
,
ethRelayer
.
clientSpec
,
ethRelayer
.
operatorInfo
)
}
}
//ApproveAllowance ...
//ApproveAllowance ...
...
...
plugin/dapp/cross2eth/ebrelayer/relayer/ethereum/ethtxs/deploy.go
View file @
a517c50d
...
@@ -499,7 +499,7 @@ finished:
...
@@ -499,7 +499,7 @@ finished:
return
x2EthContracts
,
deployInfo
,
nil
return
x2EthContracts
,
deployInfo
,
nil
}
}
func
DeployERC20
(
ownerAddr
,
name
,
symbol
string
,
amount
*
big
.
Int
,
client
ethinterface
.
EthClientSpec
,
para
*
OperatorInfo
)
(
string
,
error
)
{
func
DeployERC20
(
ownerAddr
,
name
,
symbol
string
,
amount
*
big
.
Int
,
decimals
uint8
,
client
ethinterface
.
EthClientSpec
,
para
*
OperatorInfo
)
(
string
,
error
)
{
if
nil
==
para
{
if
nil
==
para
{
return
""
,
errors
.
New
(
"no operator private key configured"
)
return
""
,
errors
.
New
(
"no operator private key configured"
)
}
}
...
@@ -523,7 +523,7 @@ func DeployERC20(ownerAddr, name, symbol string, amount *big.Int, client ethinte
...
@@ -523,7 +523,7 @@ func DeployERC20(ownerAddr, name, symbol string, amount *big.Int, client ethinte
txslog
.
Info
(
"DeployERC20"
,
"ownerAddr"
,
ownerAddr
,
"name"
,
name
,
"symbol"
,
symbol
,
"amount"
,
amount
,
"client"
,
client
)
txslog
.
Info
(
"DeployERC20"
,
"ownerAddr"
,
ownerAddr
,
"name"
,
name
,
"symbol"
,
symbol
,
"amount"
,
amount
,
"client"
,
client
)
Erc20OwnerAddr
:=
common
.
HexToAddress
(
ownerAddr
)
Erc20OwnerAddr
:=
common
.
HexToAddress
(
ownerAddr
)
Erc20Addr
,
deployTx
,
_
,
err
:=
erc20
.
DeployERC20
(
operatorAuth
,
client
,
name
,
symbol
,
amount
,
Erc20OwnerAddr
)
Erc20Addr
,
deployTx
,
_
,
err
:=
erc20
.
DeployERC20
(
operatorAuth
,
client
,
name
,
symbol
,
amount
,
Erc20OwnerAddr
,
decimals
)
if
nil
!=
err
{
if
nil
!=
err
{
txslog
.
Error
(
"DeployERC20"
,
"Failed to DeployErc20 with err:"
,
err
.
Error
())
txslog
.
Error
(
"DeployERC20"
,
"Failed to DeployErc20 with err:"
,
err
.
Error
())
return
""
,
err
return
""
,
err
...
...
plugin/dapp/cross2eth/ebrelayer/relayer/manager.go
View file @
a517c50d
...
@@ -485,7 +485,7 @@ func (manager *Manager) DeployERC20(Erc20Token relayerTypes.ERC20Token, result *
...
@@ -485,7 +485,7 @@ func (manager *Manager) DeployERC20(Erc20Token relayerTypes.ERC20Token, result *
return
err
return
err
}
}
Erc20Addr
,
err
:=
manager
.
ethRelayer
.
DeployERC20
(
Erc20Token
.
Owner
,
Erc20Token
.
Name
,
Erc20Token
.
Symbol
,
Erc20Token
.
Amount
)
Erc20Addr
,
err
:=
manager
.
ethRelayer
.
DeployERC20
(
Erc20Token
.
Owner
,
Erc20Token
.
Name
,
Erc20Token
.
Symbol
,
Erc20Token
.
Amount
,
uint8
(
Erc20Token
.
Decimals
)
)
if
nil
!=
err
{
if
nil
!=
err
{
return
err
return
err
}
}
...
...
plugin/dapp/cross2eth/ebrelayer/types/relayer.pb.go
View file @
a517c50d
...
@@ -2133,6 +2133,7 @@ type ERC20Token struct {
...
@@ -2133,6 +2133,7 @@ type ERC20Token struct {
Name
string
`protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Name
string
`protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Symbol
string
`protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"`
Symbol
string
`protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"`
Amount
string
`protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"`
Amount
string
`protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"`
Decimals
int32
`protobuf:"varint,5,opt,name=decimals,proto3" json:"decimals,omitempty"`
}
}
func
(
x
*
ERC20Token
)
Reset
()
{
func
(
x
*
ERC20Token
)
Reset
()
{
...
@@ -2195,6 +2196,13 @@ func (x *ERC20Token) GetAmount() string {
...
@@ -2195,6 +2196,13 @@ func (x *ERC20Token) GetAmount() string {
return
""
return
""
}
}
func
(
x
*
ERC20Token
)
GetDecimals
()
int32
{
if
x
!=
nil
{
return
x
.
Decimals
}
return
0
}
type
ETHTokenLockAddress
struct
{
type
ETHTokenLockAddress
struct
{
state
protoimpl
.
MessageState
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
sizeCache
protoimpl
.
SizeCache
...
@@ -2568,28 +2576,30 @@ var file_relayer_proto_rawDesc = []byte{
...
@@ -2568,28 +2576,30 @@ var file_relayer_proto_rawDesc = []byte{
0x72
,
0x69
,
0x76
,
0x61
,
0x74
,
0x65
,
0x4b
,
0x65
,
0x79
,
0x12
,
0x2a
,
0x0a
,
0x10
,
0x6f
,
0x77
,
0x6e
,
0x72
,
0x69
,
0x76
,
0x61
,
0x74
,
0x65
,
0x4b
,
0x65
,
0x79
,
0x12
,
0x2a
,
0x0a
,
0x10
,
0x6f
,
0x77
,
0x6e
,
0x65
,
0x72
,
0x50
,
0x72
,
0x69
,
0x76
,
0x61
,
0x74
,
0x65
,
0x4b
,
0x65
,
0x79
,
0x73
,
0x18
,
0x05
,
0x20
,
0x65
,
0x72
,
0x50
,
0x72
,
0x69
,
0x76
,
0x61
,
0x74
,
0x65
,
0x4b
,
0x65
,
0x79
,
0x73
,
0x18
,
0x05
,
0x20
,
0x03
,
0x28
,
0x09
,
0x52
,
0x10
,
0x6f
,
0x77
,
0x6e
,
0x65
,
0x72
,
0x50
,
0x72
,
0x69
,
0x76
,
0x61
,
0x74
,
0x03
,
0x28
,
0x09
,
0x52
,
0x10
,
0x6f
,
0x77
,
0x6e
,
0x65
,
0x72
,
0x50
,
0x72
,
0x69
,
0x76
,
0x61
,
0x74
,
0x65
,
0x4b
,
0x65
,
0x79
,
0x73
,
0x22
,
0x66
,
0x0a
,
0x0a
,
0x45
,
0x52
,
0x43
,
0x32
,
0x30
,
0x54
,
0x6f
,
0x65
,
0x4b
,
0x65
,
0x79
,
0x73
,
0x22
,
0x82
,
0x01
,
0x0a
,
0x0a
,
0x45
,
0x52
,
0x43
,
0x32
,
0x30
,
0x54
,
0x6b
,
0x65
,
0x6e
,
0x12
,
0x14
,
0x0a
,
0x05
,
0x6f
,
0x77
,
0x6e
,
0x65
,
0x72
,
0x18
,
0x01
,
0x20
,
0x01
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x12
,
0x14
,
0x0a
,
0x05
,
0x6f
,
0x77
,
0x6e
,
0x65
,
0x72
,
0x18
,
0x01
,
0x20
,
0x28
,
0x09
,
0x52
,
0x05
,
0x6f
,
0x77
,
0x6e
,
0x65
,
0x72
,
0x12
,
0x12
,
0x0a
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x01
,
0x28
,
0x09
,
0x52
,
0x05
,
0x6f
,
0x77
,
0x6e
,
0x65
,
0x72
,
0x12
,
0x12
,
0x0a
,
0x04
,
0x6e
,
0x61
,
0x65
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x12
,
0x16
,
0x0a
,
0x6d
,
0x65
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x12
,
0x16
,
0x06
,
0x73
,
0x79
,
0x6d
,
0x62
,
0x6f
,
0x6c
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x06
,
0x73
,
0x0a
,
0x06
,
0x73
,
0x79
,
0x6d
,
0x62
,
0x6f
,
0x6c
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x06
,
0x79
,
0x6d
,
0x62
,
0x6f
,
0x6c
,
0x12
,
0x16
,
0x0a
,
0x06
,
0x61
,
0x6d
,
0x6f
,
0x75
,
0x6e
,
0x74
,
0x18
,
0x73
,
0x79
,
0x6d
,
0x62
,
0x6f
,
0x6c
,
0x12
,
0x16
,
0x0a
,
0x06
,
0x61
,
0x6d
,
0x6f
,
0x75
,
0x6e
,
0x74
,
0x04
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x06
,
0x61
,
0x6d
,
0x6f
,
0x75
,
0x6e
,
0x74
,
0x22
,
0x47
,
0x0a
,
0x18
,
0x04
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x06
,
0x61
,
0x6d
,
0x6f
,
0x75
,
0x6e
,
0x74
,
0x12
,
0x1a
,
0x13
,
0x45
,
0x54
,
0x48
,
0x54
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x4c
,
0x6f
,
0x63
,
0x6b
,
0x41
,
0x64
,
0x64
,
0x0a
,
0x08
,
0x64
,
0x65
,
0x63
,
0x69
,
0x6d
,
0x61
,
0x6c
,
0x73
,
0x18
,
0x05
,
0x20
,
0x01
,
0x28
,
0x05
,
0x72
,
0x65
,
0x73
,
0x73
,
0x12
,
0x18
,
0x0a
,
0x07
,
0x61
,
0x64
,
0x64
,
0x72
,
0x65
,
0x73
,
0x73
,
0x18
,
0x52
,
0x08
,
0x64
,
0x65
,
0x63
,
0x69
,
0x6d
,
0x61
,
0x6c
,
0x73
,
0x22
,
0x47
,
0x0a
,
0x13
,
0x45
,
0x54
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x07
,
0x61
,
0x64
,
0x64
,
0x72
,
0x65
,
0x73
,
0x73
,
0x12
,
0x16
,
0x48
,
0x54
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x4c
,
0x6f
,
0x63
,
0x6b
,
0x41
,
0x64
,
0x64
,
0x72
,
0x65
,
0x73
,
0x0a
,
0x06
,
0x73
,
0x79
,
0x6d
,
0x62
,
0x6f
,
0x6c
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x06
,
0x73
,
0x12
,
0x18
,
0x0a
,
0x07
,
0x61
,
0x64
,
0x64
,
0x72
,
0x65
,
0x73
,
0x73
,
0x18
,
0x01
,
0x20
,
0x01
,
0x73
,
0x79
,
0x6d
,
0x62
,
0x6f
,
0x6c
,
0x22
,
0x89
,
0x01
,
0x0a
,
0x1b
,
0x45
,
0x54
,
0x48
,
0x43
,
0x6f
,
0x28
,
0x09
,
0x52
,
0x07
,
0x61
,
0x64
,
0x64
,
0x72
,
0x65
,
0x73
,
0x73
,
0x12
,
0x16
,
0x0a
,
0x06
,
0x73
,
0x6e
,
0x66
,
0x69
,
0x67
,
0x4c
,
0x6f
,
0x63
,
0x6b
,
0x65
,
0x64
,
0x54
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x4f
,
0x79
,
0x6d
,
0x62
,
0x6f
,
0x6c
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x06
,
0x73
,
0x79
,
0x6d
,
0x66
,
0x66
,
0x6c
,
0x69
,
0x6e
,
0x65
,
0x12
,
0x18
,
0x0a
,
0x07
,
0x61
,
0x64
,
0x64
,
0x72
,
0x65
,
0x73
,
0x62
,
0x6f
,
0x6c
,
0x22
,
0x89
,
0x01
,
0x0a
,
0x1b
,
0x45
,
0x54
,
0x48
,
0x43
,
0x6f
,
0x6e
,
0x66
,
0x69
,
0x73
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x07
,
0x61
,
0x64
,
0x64
,
0x72
,
0x65
,
0x73
,
0x73
,
0x67
,
0x4c
,
0x6f
,
0x63
,
0x6b
,
0x65
,
0x64
,
0x54
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x4f
,
0x66
,
0x66
,
0x6c
,
0x12
,
0x16
,
0x0a
,
0x06
,
0x73
,
0x79
,
0x6d
,
0x62
,
0x6f
,
0x6c
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x69
,
0x6e
,
0x65
,
0x12
,
0x18
,
0x0a
,
0x07
,
0x61
,
0x64
,
0x64
,
0x72
,
0x65
,
0x73
,
0x73
,
0x18
,
0x01
,
0x52
,
0x06
,
0x73
,
0x79
,
0x6d
,
0x62
,
0x6f
,
0x6c
,
0x12
,
0x1c
,
0x0a
,
0x09
,
0x74
,
0x68
,
0x72
,
0x65
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x07
,
0x61
,
0x64
,
0x64
,
0x72
,
0x65
,
0x73
,
0x73
,
0x12
,
0x16
,
0x0a
,
0x73
,
0x68
,
0x6f
,
0x6c
,
0x64
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x09
,
0x74
,
0x68
,
0x72
,
0x06
,
0x73
,
0x79
,
0x6d
,
0x62
,
0x6f
,
0x6c
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x06
,
0x73
,
0x65
,
0x73
,
0x68
,
0x6f
,
0x6c
,
0x64
,
0x12
,
0x1a
,
0x0a
,
0x08
,
0x70
,
0x65
,
0x72
,
0x63
,
0x65
,
0x6e
,
0x79
,
0x6d
,
0x62
,
0x6f
,
0x6c
,
0x12
,
0x1c
,
0x0a
,
0x09
,
0x74
,
0x68
,
0x72
,
0x65
,
0x73
,
0x68
,
0x6f
,
0x74
,
0x73
,
0x18
,
0x04
,
0x20
,
0x01
,
0x28
,
0x0d
,
0x52
,
0x08
,
0x70
,
0x65
,
0x72
,
0x63
,
0x65
,
0x6e
,
0x6c
,
0x64
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x09
,
0x74
,
0x68
,
0x72
,
0x65
,
0x73
,
0x68
,
0x74
,
0x73
,
0x42
,
0x0a
,
0x5a
,
0x08
,
0x2e
,
0x2e
,
0x2f
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x62
,
0x06
,
0x6f
,
0x6c
,
0x64
,
0x12
,
0x1a
,
0x0a
,
0x08
,
0x70
,
0x65
,
0x72
,
0x63
,
0x65
,
0x6e
,
0x74
,
0x73
,
0x18
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x33
,
0x04
,
0x20
,
0x01
,
0x28
,
0x0d
,
0x52
,
0x08
,
0x70
,
0x65
,
0x72
,
0x63
,
0x65
,
0x6e
,
0x74
,
0x73
,
0x42
,
0x0a
,
0x5a
,
0x08
,
0x2e
,
0x2e
,
0x2f
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x62
,
0x06
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x33
,
}
}
var
(
var
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment