From 89af5ed6c188bfb90ddde7ff0f9e6e4ab32d6521 Mon Sep 17 00:00:00 2001 From: Aleksandr Kuperman Date: Thu, 7 Nov 2024 06:30:34 +0000 Subject: [PATCH] doc: natspec --- abis/0.8.28/WormholeRelayer.json | 4 ++-- contracts/bridges/WormholeRelayer.sol | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/abis/0.8.28/WormholeRelayer.json b/abis/0.8.28/WormholeRelayer.json index 8312061..2f38016 100644 --- a/abis/0.8.28/WormholeRelayer.json +++ b/abis/0.8.28/WormholeRelayer.json @@ -143,8 +143,8 @@ "type": "function" } ], - "bytecode": "0x60a060405260015f553480156012575f5ffd5b50604051610826380380610826833981016040819052602f91603f565b6001600160a01b0316608052606a565b5f60208284031215604e575f5ffd5b81516001600160a01b03811681146063575f5ffd5b9392505050565b60805161079761008f5f395f8181606e0152818161020301526103da01526107975ff3fe608060405260043610610028575f3560e01c80634b5ca6f41461002c578063da25b7251461005d575b5f5ffd5b61003f61003a3660046104d6565b6100b5565b60405167ffffffffffffffff90911681526020015b60405180910390f35b348015610068575f5ffd5b506100907f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610054565b5f60015f5411156100f2576040517f8beb9d1600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025f5573ffffffffffffffffffffffffffffffffffffffff8716158061012d575073ffffffffffffffffffffffffffffffffffffffff8216155b15610164576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff8816158061017457508551155b8061017d575083155b8061018a575061ffff8316155b156101c1576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fc23ee3c300000000000000000000000000000000000000000000000000000000815261ffff8916600482015260248101869052604481018590525f907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063c23ee3c3906064016040805180830381865afa15801561025c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102809190610619565b509050348111156102cb576040517f491a2bb1000000000000000000000000000000000000000000000000000000008152346004820152602481018290526044015b60405180910390fd5b5f6102d6823461063b565b9050801561039d576040515f90329083908381818185875af1925050503d805f811461031d576040519150601f19603f3d011682016040523d82523d5f602084013e610322565b606091505b5050905080610366576040517f1c43b976000000000000000000000000000000000000000000000000000000008152326004820152602481018390526044016102c2565b60405182815232907f8e49ed3e274fbea1556bdfaa9a37a0c28445bfe26d57beaf9f04fd517aa417419060200160405180910390a2505b6040517f4b5ca6f400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690634b5ca6f490849061041d908e908e908e908e908e908e908e90600401610679565b60206040518083038185885af1158015610439573d5f5f3e3d5ffd5b50505050506040513d601f19601f8201168201806040525081019061045e9190610733565b60015f559a9950505050505050505050565b803561ffff81168114610481575f5ffd5b919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610481575f5ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f5f5f5f5f5f5f60e0888a0312156104ec575f5ffd5b6104f588610470565b965061050360208901610486565b9550604088013567ffffffffffffffff81111561051e575f5ffd5b8801601f81018a1361052e575f5ffd5b803567ffffffffffffffff811115610548576105486104a9565b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501160116810181811067ffffffffffffffff821117156105b4576105b46104a9565b6040528181528282016020018c10156105cb575f5ffd5b816020840160208301375f9181016020019190915295505060608801359350608088013592506105fd60a08901610470565b915061060b60c08901610486565b905092959891949750929550565b5f5f6040838503121561062a575f5ffd5b505080516020909101519092909150565b81810381811115610673577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b92915050565b61ffff8816815273ffffffffffffffffffffffffffffffffffffffff8716602082015260e060408201525f86518060e0840152806020890161010085015e5f61010082850101526101007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505085606083015284608083015261ffff841660a083015261072760c083018473ffffffffffffffffffffffffffffffffffffffff169052565b98975050505050505050565b5f60208284031215610743575f5ffd5b815167ffffffffffffffff8116811461075a575f5ffd5b939250505056fea2646970667358221220d6e1a3d1fe201bf16c4ed18bd81b481ca79ca4c0d03f37ce9852bc9ae063de3d64736f6c634300081c0033", - "deployedBytecode": "0x608060405260043610610028575f3560e01c80634b5ca6f41461002c578063da25b7251461005d575b5f5ffd5b61003f61003a3660046104d6565b6100b5565b60405167ffffffffffffffff90911681526020015b60405180910390f35b348015610068575f5ffd5b506100907f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610054565b5f60015f5411156100f2576040517f8beb9d1600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025f5573ffffffffffffffffffffffffffffffffffffffff8716158061012d575073ffffffffffffffffffffffffffffffffffffffff8216155b15610164576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff8816158061017457508551155b8061017d575083155b8061018a575061ffff8316155b156101c1576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fc23ee3c300000000000000000000000000000000000000000000000000000000815261ffff8916600482015260248101869052604481018590525f907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063c23ee3c3906064016040805180830381865afa15801561025c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102809190610619565b509050348111156102cb576040517f491a2bb1000000000000000000000000000000000000000000000000000000008152346004820152602481018290526044015b60405180910390fd5b5f6102d6823461063b565b9050801561039d576040515f90329083908381818185875af1925050503d805f811461031d576040519150601f19603f3d011682016040523d82523d5f602084013e610322565b606091505b5050905080610366576040517f1c43b976000000000000000000000000000000000000000000000000000000008152326004820152602481018390526044016102c2565b60405182815232907f8e49ed3e274fbea1556bdfaa9a37a0c28445bfe26d57beaf9f04fd517aa417419060200160405180910390a2505b6040517f4b5ca6f400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690634b5ca6f490849061041d908e908e908e908e908e908e908e90600401610679565b60206040518083038185885af1158015610439573d5f5f3e3d5ffd5b50505050506040513d601f19601f8201168201806040525081019061045e9190610733565b60015f559a9950505050505050505050565b803561ffff81168114610481575f5ffd5b919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610481575f5ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f5f5f5f5f5f5f60e0888a0312156104ec575f5ffd5b6104f588610470565b965061050360208901610486565b9550604088013567ffffffffffffffff81111561051e575f5ffd5b8801601f81018a1361052e575f5ffd5b803567ffffffffffffffff811115610548576105486104a9565b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501160116810181811067ffffffffffffffff821117156105b4576105b46104a9565b6040528181528282016020018c10156105cb575f5ffd5b816020840160208301375f9181016020019190915295505060608801359350608088013592506105fd60a08901610470565b915061060b60c08901610486565b905092959891949750929550565b5f5f6040838503121561062a575f5ffd5b505080516020909101519092909150565b81810381811115610673577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b92915050565b61ffff8816815273ffffffffffffffffffffffffffffffffffffffff8716602082015260e060408201525f86518060e0840152806020890161010085015e5f61010082850101526101007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505085606083015284608083015261ffff841660a083015261072760c083018473ffffffffffffffffffffffffffffffffffffffff169052565b98975050505050505050565b5f60208284031215610743575f5ffd5b815167ffffffffffffffff8116811461075a575f5ffd5b939250505056fea2646970667358221220d6e1a3d1fe201bf16c4ed18bd81b481ca79ca4c0d03f37ce9852bc9ae063de3d64736f6c634300081c0033", + "bytecode": "0x60a060405260015f553480156012575f5ffd5b50604051610826380380610826833981016040819052602f91603f565b6001600160a01b0316608052606a565b5f60208284031215604e575f5ffd5b81516001600160a01b03811681146063575f5ffd5b9392505050565b60805161079761008f5f395f8181606e0152818161020301526103da01526107975ff3fe608060405260043610610028575f3560e01c80634b5ca6f41461002c578063da25b7251461005d575b5f5ffd5b61003f61003a3660046104d6565b6100b5565b60405167ffffffffffffffff90911681526020015b60405180910390f35b348015610068575f5ffd5b506100907f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610054565b5f60015f5411156100f2576040517f8beb9d1600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025f5573ffffffffffffffffffffffffffffffffffffffff8716158061012d575073ffffffffffffffffffffffffffffffffffffffff8216155b15610164576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff8816158061017457508551155b8061017d575083155b8061018a575061ffff8316155b156101c1576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fc23ee3c300000000000000000000000000000000000000000000000000000000815261ffff8916600482015260248101869052604481018590525f907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063c23ee3c3906064016040805180830381865afa15801561025c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102809190610619565b509050348111156102cb576040517f491a2bb1000000000000000000000000000000000000000000000000000000008152346004820152602481018290526044015b60405180910390fd5b5f6102d6823461063b565b9050801561039d576040515f90329083908381818185875af1925050503d805f811461031d576040519150601f19603f3d011682016040523d82523d5f602084013e610322565b606091505b5050905080610366576040517f1c43b976000000000000000000000000000000000000000000000000000000008152326004820152602481018390526044016102c2565b60405182815232907f8e49ed3e274fbea1556bdfaa9a37a0c28445bfe26d57beaf9f04fd517aa417419060200160405180910390a2505b6040517f4b5ca6f400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690634b5ca6f490849061041d908e908e908e908e908e908e908e90600401610679565b60206040518083038185885af1158015610439573d5f5f3e3d5ffd5b50505050506040513d601f19601f8201168201806040525081019061045e9190610733565b60015f559a9950505050505050505050565b803561ffff81168114610481575f5ffd5b919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610481575f5ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f5f5f5f5f5f5f60e0888a0312156104ec575f5ffd5b6104f588610470565b965061050360208901610486565b9550604088013567ffffffffffffffff81111561051e575f5ffd5b8801601f81018a1361052e575f5ffd5b803567ffffffffffffffff811115610548576105486104a9565b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501160116810181811067ffffffffffffffff821117156105b4576105b46104a9565b6040528181528282016020018c10156105cb575f5ffd5b816020840160208301375f9181016020019190915295505060608801359350608088013592506105fd60a08901610470565b915061060b60c08901610486565b905092959891949750929550565b5f5f6040838503121561062a575f5ffd5b505080516020909101519092909150565b81810381811115610673577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b92915050565b61ffff8816815273ffffffffffffffffffffffffffffffffffffffff8716602082015260e060408201525f86518060e0840152806020890161010085015e5f61010082850101526101007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505085606083015284608083015261ffff841660a083015261072760c083018473ffffffffffffffffffffffffffffffffffffffff169052565b98975050505050505050565b5f60208284031215610743575f5ffd5b815167ffffffffffffffff8116811461075a575f5ffd5b939250505056fea264697066735822122080362fd425a0ad8c3722a03f29d26a8c8118ef255714070a663ec545a85a33bb64736f6c634300081c0033", + "deployedBytecode": "0x608060405260043610610028575f3560e01c80634b5ca6f41461002c578063da25b7251461005d575b5f5ffd5b61003f61003a3660046104d6565b6100b5565b60405167ffffffffffffffff90911681526020015b60405180910390f35b348015610068575f5ffd5b506100907f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610054565b5f60015f5411156100f2576040517f8beb9d1600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025f5573ffffffffffffffffffffffffffffffffffffffff8716158061012d575073ffffffffffffffffffffffffffffffffffffffff8216155b15610164576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff8816158061017457508551155b8061017d575083155b8061018a575061ffff8316155b156101c1576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fc23ee3c300000000000000000000000000000000000000000000000000000000815261ffff8916600482015260248101869052604481018590525f907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063c23ee3c3906064016040805180830381865afa15801561025c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102809190610619565b509050348111156102cb576040517f491a2bb1000000000000000000000000000000000000000000000000000000008152346004820152602481018290526044015b60405180910390fd5b5f6102d6823461063b565b9050801561039d576040515f90329083908381818185875af1925050503d805f811461031d576040519150601f19603f3d011682016040523d82523d5f602084013e610322565b606091505b5050905080610366576040517f1c43b976000000000000000000000000000000000000000000000000000000008152326004820152602481018390526044016102c2565b60405182815232907f8e49ed3e274fbea1556bdfaa9a37a0c28445bfe26d57beaf9f04fd517aa417419060200160405180910390a2505b6040517f4b5ca6f400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690634b5ca6f490849061041d908e908e908e908e908e908e908e90600401610679565b60206040518083038185885af1158015610439573d5f5f3e3d5ffd5b50505050506040513d601f19601f8201168201806040525081019061045e9190610733565b60015f559a9950505050505050505050565b803561ffff81168114610481575f5ffd5b919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610481575f5ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f5f5f5f5f5f5f60e0888a0312156104ec575f5ffd5b6104f588610470565b965061050360208901610486565b9550604088013567ffffffffffffffff81111561051e575f5ffd5b8801601f81018a1361052e575f5ffd5b803567ffffffffffffffff811115610548576105486104a9565b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501160116810181811067ffffffffffffffff821117156105b4576105b46104a9565b6040528181528282016020018c10156105cb575f5ffd5b816020840160208301375f9181016020019190915295505060608801359350608088013592506105fd60a08901610470565b915061060b60c08901610486565b905092959891949750929550565b5f5f6040838503121561062a575f5ffd5b505080516020909101519092909150565b81810381811115610673577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b92915050565b61ffff8816815273ffffffffffffffffffffffffffffffffffffffff8716602082015260e060408201525f86518060e0840152806020890161010085015e5f61010082850101526101007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505085606083015284608083015261ffff841660a083015261072760c083018473ffffffffffffffffffffffffffffffffffffffff169052565b98975050505050505050565b5f60208284031215610743575f5ffd5b815167ffffffffffffffff8116811461075a575f5ffd5b939250505056fea264697066735822122080362fd425a0ad8c3722a03f29d26a8c8118ef255714070a663ec545a85a33bb64736f6c634300081c0033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/contracts/bridges/WormholeRelayer.sol b/contracts/bridges/WormholeRelayer.sol index 3e00d3f..a0279e9 100644 --- a/contracts/bridges/WormholeRelayer.sol +++ b/contracts/bridges/WormholeRelayer.sol @@ -13,7 +13,6 @@ interface IWormhole { /// Note: This value can be overridden by the delivery provider on the target chain. The returned value here should be considered to be a /// promise by the delivery provider of the amount of refund per gas unused that will be returned to the refundAddress at the target chain. /// If a delivery provider decides to override, this will be visible as part of the emitted Delivery event on the target chain. - /// function quoteEVMDeliveryPrice( uint16 targetChain, uint256 receiverValue, @@ -89,15 +88,16 @@ contract WormholeRelayer { /// @dev Relays a payload via Wormhole relayer to the address `targetAddress` on chain `targetChain` /// with gas limit `gasLimit` and `msg.value` equal to `receiverValue`. /// @notice This function takes arbitrary `msg.value` and adjusts the cost for relayer exact amount. - /// @param targetChain in Wormhole Chain ID format - /// @param targetAddress address to call on targetChain (that implements IWormholeReceiver) - /// @param payload arbitrary bytes to pass in as parameter in call to `targetAddress` - /// @param receiverValue msg.value that delivery provider should pass in for call to `targetAddress` (in targetChain currency units) + /// @param targetChain in Wormhole Chain ID format. + /// @param targetAddress address to call on targetChain (that implements IWormholeReceiver). + /// @param payload arbitrary bytes to pass in as parameter in call to `targetAddress`. + /// @param receiverValue msg.value that delivery provider should pass in for call to `targetAddress` + /// in `targetChain` currency units. /// @param gasLimit gas limit with which to call `targetAddress`. Any units of gas unused will be refunded according to the - /// `targetChainRefundPerGasUnused` rate quoted by the delivery provider - /// @param refundChain The chain to deliver any refund to, in Wormhole Chain ID format - /// @param refundAddress The address on `refundChain` to deliver any refund to - /// @return sequence sequence number of published VAA containing delivery instructions + /// `targetChainRefundPerGasUnused` rate quoted by the delivery provider. + /// @param refundChain The chain to deliver any refund to, in Wormhole Chain ID format. + /// @param refundAddress The address on `refundChain` to deliver any refund to. + /// @return sequence Sequence number of published VAA containing delivery instructions. function sendPayloadToEvm( uint16 targetChain, address targetAddress,