github.com/InjectiveLabs/sdk-go@v1.53.0/chain/peggy/types/abi_json.go (about)

     1  package types
     2  
     3  // The go-ethereum ABI encoder *only* encodes function calls and then it only encodes
     4  // function calls for which you provide an ABI json just like you would get out of the
     5  // solidity compiler with your compiled contract.
     6  // You are supposed to compile your contract, use abigen to generate an ABI , import
     7  // this generated go module and then use for that for all testing and development.
     8  // This abstraction layer is more trouble than it's worth, because we don't want to
     9  // encode a function call at all, but instead we want to emulate a Solidity encode operation
    10  // which has no equal available from go-ethereum.
    11  //
    12  // In order to work around this absurd series of problems we have to manually write the below
    13  // 'function specification' that will encode the same arguments into a function call. We can then
    14  // truncate the first several bytes where the call name is encoded to finally get the equal of the
    15  
    16  const (
    17  	// OutgoingBatchTxCheckpointABIJSON checks the ETH ABI for compatibility of the OutgoingBatchTx message
    18  	OutgoingBatchTxCheckpointABIJSON = `[{
    19  		"name": "submitBatch",
    20  		"stateMutability": "pure",
    21  		"type": "function",
    22  		"inputs": [
    23  			{ "internalType": "bytes32",   "name": "_peggyId",       "type": "bytes32" },
    24  			{ "internalType": "bytes32",   "name": "_methodName",    "type": "bytes32" },
    25  			{ "internalType": "uint256[]", "name": "_amounts",       "type": "uint256[]" },
    26  			{ "internalType": "address[]", "name": "_destinations",  "type": "address[]" },
    27  			{ "internalType": "uint256[]", "name": "_fees",          "type": "uint256[]" },
    28  			{ "internalType": "uint256",   "name": "_batchNonce",    "type": "uint256" },
    29  			{ "internalType": "address",   "name": "_tokenContract", "type": "address" },
    30  			{ "internalType": "uint256",   "name": "_batchTimeout",  "type": "uint256" }
    31  		],
    32  		"outputs": [
    33  			{ "internalType": "bytes32", "name": "", "type": "bytes32" }
    34  		]
    35  	}]`
    36  
    37  	// ValsetCheckpointABIJSON checks the ETH ABI for compatibility of the Valset update message
    38  	ValsetCheckpointABIJSON = `[{
    39  		"name": "checkpoint",
    40  		"stateMutability": "pure",
    41  		"type": "function",
    42  		"inputs": [
    43  			{ "internalType": "bytes32",   "name": "_peggyId",   "type": "bytes32"   },
    44  			{ "internalType": "bytes32",   "name": "_checkpoint",  "type": "bytes32"   },
    45  			{ "internalType": "uint256",   "name": "_valsetNonce", "type": "uint256"   },
    46  			{ "internalType": "address[]", "name": "_validators",  "type": "address[]" },
    47  			{ "internalType": "uint256[]", "name": "_powers",      "type": "uint256[]" },
    48  			{ "internalType": "uint256",   "name": "_rewardAmount","type": "uint256"   },
    49  			{ "internalType": "address",   "name": "_rewardToken", "type": "address"   }
    50  		],
    51  		"outputs": [
    52  			{ "internalType": "bytes32", "name": "", "type": "bytes32" }
    53  		]
    54  	}]`
    55  )