Skip to content

Commit

Permalink
connector test contract
Browse files Browse the repository at this point in the history
  • Loading branch information
lumtis committed Apr 10, 2024
1 parent e648ddc commit b7802b0
Show file tree
Hide file tree
Showing 6 changed files with 1,199 additions and 0 deletions.
202 changes: 202 additions & 0 deletions e2e/contracts/testconnectorzevm/TestZetaConnectorZEVM.abi
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
[
{
"inputs": [
{
"internalType": "address",
"name": "wzeta_",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "FailedZetaSent",
"type": "error"
},
{
"inputs": [],
"name": "OnlyFungibleModule",
"type": "error"
},
{
"inputs": [],
"name": "OnlyWZETA",
"type": "error"
},
{
"inputs": [],
"name": "WZETATransferFailed",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "wzeta_",
"type": "address"
}
],
"name": "SetWZETA",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "sourceTxOriginAddress",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "zetaTxSenderAddress",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "destinationChainId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bytes",
"name": "destinationAddress",
"type": "bytes"
},
{
"indexed": false,
"internalType": "uint256",
"name": "zetaValueAndGas",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "destinationGasLimit",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bytes",
"name": "message",
"type": "bytes"
},
{
"indexed": false,
"internalType": "bytes",
"name": "zetaParams",
"type": "bytes"
}
],
"name": "ZetaSent",
"type": "event"
},
{
"inputs": [],
"name": "FUNGIBLE_MODULE_ADDRESS",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "foo",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "uint256",
"name": "destinationChainId",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "destinationAddress",
"type": "bytes"
},
{
"internalType": "uint256",
"name": "destinationGasLimit",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "message",
"type": "bytes"
},
{
"internalType": "uint256",
"name": "zetaValueAndGas",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "zetaParams",
"type": "bytes"
}
],
"internalType": "struct ZetaInterfaces.SendInput",
"name": "input",
"type": "tuple"
}
],
"name": "send",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "wzeta_",
"type": "address"
}
],
"name": "setWzetaAddress",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "wzeta",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"stateMutability": "payable",
"type": "receive"
}
]
1 change: 1 addition & 0 deletions e2e/contracts/testconnectorzevm/TestZetaConnectorZEVM.bin
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
608060405234801561001057600080fd5b50604051610b56380380610b56833981810160405281019061003291906100db565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610108565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100a88261007d565b9050919050565b6100b88161009d565b81146100c357600080fd5b50565b6000815190506100d5816100af565b92915050565b6000602082840312156100f1576100f0610078565b5b60006100ff848285016100c6565b91505092915050565b610a3f806101176000396000f3fe60806040526004361061004d5760003560e01c8062173d46146100de5780633ce4a5bc14610109578063c298557814610134578063eb3bacbd1461015f578063ec02690114610188576100d9565b366100d95760008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100d7576040517f6e6b6de700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b005b600080fd5b3480156100ea57600080fd5b506100f36101b1565b604051610100919061061b565b60405180910390f35b34801561011557600080fd5b5061011e6101d5565b60405161012b919061061b565b60405180910390f35b34801561014057600080fd5b506101496101ed565b60405161015691906106c6565b60405180910390f35b34801561016b57600080fd5b506101866004803603810190610181919061071e565b61022a565b005b34801561019457600080fd5b506101af60048036038101906101aa919061076f565b61031d565b005b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b73735b14bb79463307aacbed86daf3322b1e6226ab81565b60606040518060400160405280600381526020017f666f6f0000000000000000000000000000000000000000000000000000000000815250905090565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102a3576040517fea02b3f300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f7325870b05f8f3412c318a35fc6a74feca51ea15811ec7a257676ca4db9d417681604051610312919061061b565b60405180910390a150565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd333084608001356040518463ffffffff1660e01b815260040161037e939291906107d1565b6020604051808303816000875af115801561039d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c19190610840565b6103f7576040517fa8c6fd4a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d82608001356040518263ffffffff1660e01b8152600401610454919061086d565b600060405180830381600087803b15801561046e57600080fd5b505af1158015610482573d6000803e3d6000fd5b50505050600073735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff1682608001356040516104c4906108b9565b60006040518083038185875af1925050503d8060008114610501576040519150601f19603f3d011682016040523d82523d6000602084013e610506565b606091505b5050905080610541576040517fc7ffc47b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600001353373ffffffffffffffffffffffffffffffffffffffff167f7ec1c94701e09b1652f3e1d307e60c4b9ebf99aff8c2079fd1d8c585e031c4e43285806020019061058f91906108dd565b876080013588604001358980606001906105a991906108dd565b8b8060a001906105b991906108dd565b6040516105ce9998979695949392919061098d565b60405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610605826105da565b9050919050565b610615816105fa565b82525050565b6000602082019050610630600083018461060c565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610670578082015181840152602081019050610655565b60008484015250505050565b6000601f19601f8301169050919050565b600061069882610636565b6106a28185610641565b93506106b2818560208601610652565b6106bb8161067c565b840191505092915050565b600060208201905081810360008301526106e0818461068d565b905092915050565b600080fd5b600080fd5b6106fb816105fa565b811461070657600080fd5b50565b600081359050610718816106f2565b92915050565b600060208284031215610734576107336106e8565b5b600061074284828501610709565b91505092915050565b600080fd5b600060c082840312156107665761076561074b565b5b81905092915050565b600060208284031215610785576107846106e8565b5b600082013567ffffffffffffffff8111156107a3576107a26106ed565b5b6107af84828501610750565b91505092915050565b6000819050919050565b6107cb816107b8565b82525050565b60006060820190506107e6600083018661060c565b6107f3602083018561060c565b61080060408301846107c2565b949350505050565b60008115159050919050565b61081d81610808565b811461082857600080fd5b50565b60008151905061083a81610814565b92915050565b600060208284031215610856576108556106e8565b5b60006108648482850161082b565b91505092915050565b600060208201905061088260008301846107c2565b92915050565b600081905092915050565b50565b60006108a3600083610888565b91506108ae82610893565b600082019050919050565b60006108c482610896565b9150819050919050565b600080fd5b600080fd5b600080fd5b600080833560016020038436030381126108fa576108f96108ce565b5b80840192508235915067ffffffffffffffff82111561091c5761091b6108d3565b5b602083019250600182023603831315610938576109376108d8565b5b509250929050565b600082825260208201905092915050565b82818337600083830152505050565b600061096c8385610940565b9350610979838584610951565b6109828361067c565b840190509392505050565b600060c0820190506109a2600083018c61060c565b81810360208301526109b5818a8c610960565b90506109c460408301896107c2565b6109d160608301886107c2565b81810360808301526109e4818688610960565b905081810360a08301526109f9818486610960565b90509a995050505050505050505056fea26469706673582212206647922040def2c6972690c7b621d67ba2619c6888ae0b5c33ce88c440cebffa64736f6c63430008170033
Loading

0 comments on commit b7802b0

Please sign in to comment.