-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into inbound-tracker
- Loading branch information
Showing
29 changed files
with
1,373 additions
and
105 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
[ | ||
{ | ||
"inputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "constructor" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "Foo", | ||
"type": "error" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "bar", | ||
"outputs": [ | ||
{ | ||
"internalType": "uint256", | ||
"name": "", | ||
"type": "uint256" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "doRevert", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "doRevertWithMessage", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "doRevertWithRequire", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "doSucceed", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "bytes", | ||
"name": "origin", | ||
"type": "bytes" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "sender", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "chainID", | ||
"type": "uint256" | ||
} | ||
], | ||
"internalType": "struct Example.zContext", | ||
"name": "context", | ||
"type": "tuple" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "zrc20", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "amount", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"internalType": "bytes", | ||
"name": "message", | ||
"type": "bytes" | ||
} | ||
], | ||
"name": "onCrossChainCall", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
} | ||
] |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
608060405234801561001057600080fd5b506000808190555061043f806100276000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c8063afc874d214610067578063d720cb4514610071578063dd8e556c1461007b578063de43156e14610085578063fd5ad965146100a1578063febb0f7e146100ab575b600080fd5b61006f6100c9565b005b6100796100fb565b005b610083610136565b005b61009f600480360381019061009a91906102be565b610179565b005b6100a9610187565b005b6100b3610191565b6040516100c09190610371565b60405180910390f35b6040517fbfb4ebcf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161012d906103e9565b60405180910390fd5b6000610177576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016e906103e9565b60405180910390fd5b565b826000819055505050505050565b6001600081905550565b60005481565b600080fd5b600080fd5b600080fd5b6000606082840312156101bc576101bb6101a1565b5b81905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006101f0826101c5565b9050919050565b610200816101e5565b811461020b57600080fd5b50565b60008135905061021d816101f7565b92915050565b6000819050919050565b61023681610223565b811461024157600080fd5b50565b6000813590506102538161022d565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261027e5761027d610259565b5b8235905067ffffffffffffffff81111561029b5761029a61025e565b5b6020830191508360018202830111156102b7576102b6610263565b5b9250929050565b6000806000806000608086880312156102da576102d9610197565b5b600086013567ffffffffffffffff8111156102f8576102f761019c565b5b610304888289016101a6565b95505060206103158882890161020e565b945050604061032688828901610244565b935050606086013567ffffffffffffffff8111156103475761034661019c565b5b61035388828901610268565b92509250509295509295909350565b61036b81610223565b82525050565b60006020820190506103866000830184610362565b92915050565b600082825260208201905092915050565b7f666f6f0000000000000000000000000000000000000000000000000000000000600082015250565b60006103d360038361038c565b91506103de8261039d565b602082019050919050565b60006020820190508181036000830152610402816103c6565b905091905056fea26469706673582212208285945d697ed6679c1d0595f68c015d717c2361d7e218ec27209cbbf18984bf64736f6c63430008150033 |
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,101 @@ | ||
{ | ||
"abi": [ | ||
{ | ||
"inputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "constructor" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "Foo", | ||
"type": "error" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "bar", | ||
"outputs": [ | ||
{ | ||
"internalType": "uint256", | ||
"name": "", | ||
"type": "uint256" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "doRevert", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "doRevertWithMessage", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "doRevertWithRequire", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "doSucceed", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "bytes", | ||
"name": "origin", | ||
"type": "bytes" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "sender", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "chainID", | ||
"type": "uint256" | ||
} | ||
], | ||
"internalType": "struct Example.zContext", | ||
"name": "context", | ||
"type": "tuple" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "zrc20", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "amount", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"internalType": "bytes", | ||
"name": "message", | ||
"type": "bytes" | ||
} | ||
], | ||
"name": "onCrossChainCall", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
} | ||
], | ||
"bin": "608060405234801561001057600080fd5b506000808190555061043f806100276000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c8063afc874d214610067578063d720cb4514610071578063dd8e556c1461007b578063de43156e14610085578063fd5ad965146100a1578063febb0f7e146100ab575b600080fd5b61006f6100c9565b005b6100796100fb565b005b610083610136565b005b61009f600480360381019061009a91906102be565b610179565b005b6100a9610187565b005b6100b3610191565b6040516100c09190610371565b60405180910390f35b6040517fbfb4ebcf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161012d906103e9565b60405180910390fd5b6000610177576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016e906103e9565b60405180910390fd5b565b826000819055505050505050565b6001600081905550565b60005481565b600080fd5b600080fd5b600080fd5b6000606082840312156101bc576101bb6101a1565b5b81905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006101f0826101c5565b9050919050565b610200816101e5565b811461020b57600080fd5b50565b60008135905061021d816101f7565b92915050565b6000819050919050565b61023681610223565b811461024157600080fd5b50565b6000813590506102538161022d565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261027e5761027d610259565b5b8235905067ffffffffffffffff81111561029b5761029a61025e565b5b6020830191508360018202830111156102b7576102b6610263565b5b9250929050565b6000806000806000608086880312156102da576102d9610197565b5b600086013567ffffffffffffffff8111156102f8576102f761019c565b5b610304888289016101a6565b95505060206103158882890161020e565b945050604061032688828901610244565b935050606086013567ffffffffffffffff8111156103475761034661019c565b5b61035388828901610268565b92509250509295509295909350565b61036b81610223565b82525050565b60006020820190506103866000830184610362565b92915050565b600082825260208201905092915050565b7f666f6f0000000000000000000000000000000000000000000000000000000000600082015250565b60006103d360038361038c565b91506103de8261039d565b602082019050919050565b60006020820190508181036000830152610402816103c6565b905091905056fea26469706673582212208285945d697ed6679c1d0595f68c015d717c2361d7e218ec27209cbbf18984bf64736f6c63430008150033" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.7; | ||
|
||
// Sample contract for evm tests | ||
contract Example { | ||
error Foo(); | ||
|
||
struct zContext { | ||
bytes origin; | ||
address sender; | ||
uint256 chainID; | ||
} | ||
|
||
uint256 public bar; | ||
|
||
constructor() { | ||
bar = 0; | ||
} | ||
|
||
function doRevert() external { | ||
revert Foo(); | ||
} | ||
|
||
function doRevertWithMessage() external { | ||
revert("foo"); | ||
} | ||
|
||
function doRevertWithRequire() external { | ||
require(false, "foo"); | ||
} | ||
|
||
function doSucceed() external { | ||
bar = 1; | ||
} | ||
|
||
function onCrossChainCall( | ||
zContext calldata context, | ||
address zrc20, | ||
uint256 amount, | ||
bytes calldata message | ||
) external { | ||
bar = amount; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
[ | ||
{ | ||
"inputs": [], | ||
"name": "Foo", | ||
"type": "error" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "bytes", | ||
"name": "origin", | ||
"type": "bytes" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "sender", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "chainID", | ||
"type": "uint256" | ||
} | ||
], | ||
"internalType": "struct Reverter.zContext", | ||
"name": "context", | ||
"type": "tuple" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "zrc20", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "amount", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"internalType": "bytes", | ||
"name": "message", | ||
"type": "bytes" | ||
} | ||
], | ||
"name": "onCrossChainCall", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
} | ||
] |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
608060405234801561001057600080fd5b5061027f806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063de43156e14610030575b600080fd5b61004a600480360381019061004591906101a5565b61004c565b005b6040517fbfb4ebcf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080fd5b600080fd5b600080fd5b6000606082840312156100a3576100a2610088565b5b81905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100d7826100ac565b9050919050565b6100e7816100cc565b81146100f257600080fd5b50565b600081359050610104816100de565b92915050565b6000819050919050565b61011d8161010a565b811461012857600080fd5b50565b60008135905061013a81610114565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261016557610164610140565b5b8235905067ffffffffffffffff81111561018257610181610145565b5b60208301915083600182028301111561019e5761019d61014a565b5b9250929050565b6000806000806000608086880312156101c1576101c061007e565b5b600086013567ffffffffffffffff8111156101df576101de610083565b5b6101eb8882890161008d565b95505060206101fc888289016100f5565b945050604061020d8882890161012b565b935050606086013567ffffffffffffffff81111561022e5761022d610083565b5b61023a8882890161014f565b9250925050929550929590935056fea2646970667358221220793398f92335fd817a4bf49381e3e4cbdfa00223720869567e31300bf71f0c9e64736f6c63430008150033 |
Oops, something went wrong.