mirror of
https://github.com/zkopru-network/zkopru.git
synced 2026-02-19 10:04:41 -05:00
refactor(contract): update withdrawal logic
This commit is contained in:
@@ -59,12 +59,17 @@ contract Coordinatable is Layer2 {
|
||||
Layer2.chain.proposals[_block.checksum] = Proposal(
|
||||
currentBlockHash,
|
||||
block.number + CHALLENGE_PERIOD,
|
||||
false,
|
||||
false
|
||||
);
|
||||
/// Record l2 chain
|
||||
Layer2.chain.parentOf[currentBlockHash] = _block.header.parentBlock;
|
||||
/// Record reference for the inclusion proofs
|
||||
Layer2.chain.utxoRootOf[currentBlockHash] = _block.header.utxoRoot;
|
||||
/// Record reference for the withdrawal proofs when only if there exists update
|
||||
if (Layer2.chain.withdrawalRootOf[_block.header.parentBlock] != _block.header.withdrawalRoot) {
|
||||
Layer2.chain.withdrawalRootOf[currentBlockHash] = _block.header.withdrawalRoot;
|
||||
}
|
||||
/// Update exit allowance period
|
||||
proposer.exitAllowance = block.number + CHALLENGE_PERIOD;
|
||||
/// Freeze the latest mass deposit for the next block proposer
|
||||
@@ -96,6 +101,7 @@ contract Coordinatable is Layer2 {
|
||||
require(finalization.header.hash() == proposal.headerHash, "Invalid header data");
|
||||
require(!proposal.slashed, "Slashed roll up can't be finalized");
|
||||
require(finalization.header.parentBlock == Layer2.chain.latest, "The latest block should be its parent");
|
||||
require(finalization.header.parentBlock != proposal.headerHash, "Reentrancy case");
|
||||
|
||||
uint totalFee = finalization.header.fee;
|
||||
/// Execute deposits and collect fees
|
||||
@@ -106,19 +112,6 @@ contract Coordinatable is Layer2 {
|
||||
chain.committedDeposits[deposit.hash()] -= 1;
|
||||
}
|
||||
|
||||
WithdrawalTree storage latest = Layer2.chain.withdrawalTrees[Layer2.chain.withdrawalTrees.length - 1];
|
||||
if (latest.index > finalization.header.withdrawalIndex) {
|
||||
/// Fully filled. Start a new withdrawal tree
|
||||
Layer2.chain.withdrawalTrees.push();
|
||||
}
|
||||
WithdrawalTree storage target = Layer2.chain.withdrawalTrees[Layer2.chain.withdrawalTrees.length - 1];
|
||||
target.root = finalization.header.withdrawalRoot;
|
||||
target.index = finalization.header.withdrawalIndex;
|
||||
|
||||
/// Update the daily snapshot of withdrawalTree tree to prevent race conditions
|
||||
Layer2.chain.wrIndex += 1;
|
||||
Layer2.chain.withdrawalRefs[Layer2.chain.wrIndex] = finalization.header.withdrawalRoot;
|
||||
|
||||
/// Record mass migrations and collect fees.
|
||||
/// A MassMigration becomes a MassDeposit for the migration destination.
|
||||
for (uint i = 0; i < finalization.massMigrations.length; i++) {
|
||||
@@ -137,6 +130,7 @@ contract Coordinatable is Layer2 {
|
||||
proposer.reward += totalFee;
|
||||
|
||||
/// Update the chain
|
||||
proposal.finalized = true;
|
||||
Layer2.chain.latest = proposal.headerHash;
|
||||
emit Finalized(proposal.headerHash);
|
||||
}
|
||||
|
||||
@@ -25,99 +25,61 @@ contract UserInteractable is Layer2 {
|
||||
) public payable {
|
||||
_deposit(eth, salt, token, amount, nft, pubKey, fee);
|
||||
}
|
||||
|
||||
|
||||
function withdraw(
|
||||
uint note,
|
||||
address owner,
|
||||
uint eth,
|
||||
address token,
|
||||
uint256 amount,
|
||||
uint256 nft,
|
||||
uint256 fee,
|
||||
uint256 root,
|
||||
uint128 leafIndex,
|
||||
uint[] memory siblings
|
||||
) internal {
|
||||
// find root
|
||||
bool rootExist = false;
|
||||
uint128 treeIndex;
|
||||
uint8 refIndex = Layer2.chain.wrIndex;
|
||||
for (uint i = 0; i < 256; i ++) {
|
||||
if (Layer2.chain.withdrawalRefs[refIndex] == root) {
|
||||
rootExist = true;
|
||||
break;
|
||||
}
|
||||
refIndex--;
|
||||
}
|
||||
require(rootExist, 'failed to find the withdrawal ref root');
|
||||
treeIndex = uint128(Layer2.chain.withdrawalTrees.length) - 1;
|
||||
if (treeIndex != 0 && Layer2.chain.withdrawalTrees[treeIndex - 1].root == root) {
|
||||
// found cached root indicates the latest archived tree's root.
|
||||
// set the tree index
|
||||
treeIndex = treeIndex - 1;
|
||||
}
|
||||
return _withdraw(
|
||||
owner,
|
||||
eth,
|
||||
token,
|
||||
amount,
|
||||
nft,
|
||||
fee,
|
||||
root,
|
||||
treeIndex,
|
||||
leafIndex,
|
||||
siblings
|
||||
);
|
||||
}
|
||||
|
||||
function withdrawArchived(
|
||||
address owner,
|
||||
uint eth,
|
||||
address token,
|
||||
uint amount,
|
||||
uint nft,
|
||||
uint fee,
|
||||
uint128 treeIndex,
|
||||
uint128 leafIndex,
|
||||
bytes32 blockHash,
|
||||
uint256 leafIndex,
|
||||
uint[] memory siblings
|
||||
) public {
|
||||
WithdrawalTree memory withdrawalTree = chain.withdrawalTrees[treeIndex];
|
||||
_withdraw(
|
||||
return _withdraw(
|
||||
note,
|
||||
owner,
|
||||
eth,
|
||||
token,
|
||||
amount,
|
||||
nft,
|
||||
fee,
|
||||
withdrawalTree.root,
|
||||
treeIndex,
|
||||
blockHash,
|
||||
leafIndex,
|
||||
siblings
|
||||
);
|
||||
}
|
||||
|
||||
function payInAdvance(
|
||||
uint note,
|
||||
address owner,
|
||||
uint eth,
|
||||
address token,
|
||||
uint amount,
|
||||
uint nft,
|
||||
uint fee,
|
||||
uint128 treeIndex,
|
||||
uint128 leafIndex,
|
||||
bytes memory signature
|
||||
) public payable {
|
||||
bytes32 withdrawalId = _withdrawalId(treeIndex, leafIndex);
|
||||
require(!Layer2.chain.withdrawn[withdrawalId], "Already withdrawn");
|
||||
bytes32 withdrawalHash = _withdrawalHash(
|
||||
note,
|
||||
owner,
|
||||
eth,
|
||||
token,
|
||||
amount,
|
||||
nft,
|
||||
fee
|
||||
);
|
||||
require(!Layer2.chain.withdrawn[withdrawalHash], "Already withdrawn");
|
||||
|
||||
uint256 noteHash = uint256(keccak256(abi.encodePacked(owner, eth, token, amount, nft, fee)));
|
||||
address newOwner = Layer2.chain.newWithdrawalOwner[withdrawalId][noteHash];
|
||||
address newOwner = Layer2.chain.newWithdrawalOwner[withdrawalHash];
|
||||
address currentOwner = newOwner == address(0) ? owner : newOwner;
|
||||
address prepayer = msg.sender;
|
||||
bytes32 payInAdvanceMsg = keccak256(
|
||||
abi.encodePacked(
|
||||
prepayer,
|
||||
noteHash,
|
||||
withdrawalId
|
||||
withdrawalHash
|
||||
)
|
||||
);
|
||||
/// verify original owner's signature
|
||||
@@ -139,7 +101,7 @@ contract UserInteractable is Layer2 {
|
||||
/// prepay ether
|
||||
payable(currentOwner).transfer(eth);
|
||||
/// transfer ownership
|
||||
Layer2.chain.newWithdrawalOwner[withdrawalId][noteHash] = prepayer;
|
||||
Layer2.chain.newWithdrawalOwner[withdrawalHash] = prepayer;
|
||||
}
|
||||
|
||||
function _deposit(
|
||||
@@ -193,32 +155,47 @@ contract UserInteractable is Layer2 {
|
||||
}
|
||||
|
||||
function _withdraw(
|
||||
uint note,
|
||||
address owner,
|
||||
uint eth,
|
||||
address token,
|
||||
uint256 amount,
|
||||
uint256 nft,
|
||||
uint256 fee,
|
||||
uint256 root,
|
||||
uint128 treeIndex,
|
||||
uint128 leafIndex,
|
||||
bytes32 blockHash,
|
||||
uint256 leafIndex,
|
||||
uint[] memory siblings
|
||||
) internal {
|
||||
require(nft*amount == 0, "Only ERC20 or ERC721");
|
||||
uint256 note = uint256(keccak256(abi.encodePacked(owner, eth, token, amount, nft, fee)));
|
||||
bytes32 withdrawalId = _withdrawalId(treeIndex, leafIndex);
|
||||
// Should not be withdrawn
|
||||
require(!Layer2.chain.withdrawn[withdrawalId], "Already withdrawn");
|
||||
require(Layer2.chain.proposals[blockHash].finalized, "Not a finalized block");
|
||||
uint256 root = Layer2.chain.withdrawalRootOf[blockHash];
|
||||
bytes32 currentBlock = blockHash;
|
||||
while (root == 0) {
|
||||
currentBlock = Layer2.chain.parentOf[currentBlock];
|
||||
root = Layer2.chain.withdrawalRootOf[currentBlock];
|
||||
// if the block does not contain any withdrawal, it does not record withdrawal root
|
||||
}
|
||||
bytes32 withdrawalHash = _withdrawalHash(
|
||||
note,
|
||||
owner,
|
||||
eth,
|
||||
token,
|
||||
amount,
|
||||
nft,
|
||||
fee
|
||||
);
|
||||
// Should not allow double-withdrawing
|
||||
require(!Layer2.chain.withdrawn[withdrawalHash], "Already withdrawn");
|
||||
// Check whether new owner exists
|
||||
address to = Layer2.chain.newWithdrawalOwner[withdrawalId][note] != address(0)
|
||||
? Layer2.chain.newWithdrawalOwner[withdrawalId][note]
|
||||
address to = Layer2.chain.newWithdrawalOwner[withdrawalHash] != address(0)
|
||||
? Layer2.chain.newWithdrawalOwner[withdrawalHash]
|
||||
: owner;
|
||||
|
||||
// inclusion proof
|
||||
bool inclusion = Hash.keccak().merkleProof(
|
||||
root,
|
||||
note,
|
||||
uint(leafIndex),
|
||||
uint(withdrawalHash),
|
||||
leafIndex,
|
||||
siblings
|
||||
);
|
||||
require(inclusion, "The given withdrawal note does not exist");
|
||||
@@ -238,11 +215,29 @@ contract UserInteractable is Layer2 {
|
||||
IERC721(token).transferFrom(address(this), to, nft);
|
||||
}
|
||||
/// Mark as withdrawn
|
||||
Layer2.chain.withdrawn[withdrawalId] = true;
|
||||
Layer2.chain.withdrawn[withdrawalHash] = true;
|
||||
}
|
||||
|
||||
function _withdrawalId(uint128 treeIndex, uint128 leafIndex) internal pure returns (bytes32) {
|
||||
return abi.decode(abi.encodePacked(treeIndex, leafIndex), (bytes32));
|
||||
function _withdrawalHash(
|
||||
uint256 note,
|
||||
address owner,
|
||||
uint eth,
|
||||
address token,
|
||||
uint256 amount,
|
||||
uint256 nft,
|
||||
uint256 fee
|
||||
) internal pure returns (bytes32) {
|
||||
return keccak256(
|
||||
abi.encodePacked(
|
||||
note,
|
||||
owner,
|
||||
eth,
|
||||
token,
|
||||
amount,
|
||||
nft,
|
||||
fee
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
function _verifySignature(
|
||||
|
||||
@@ -80,7 +80,7 @@ contract TxChallenge is Challengeable {
|
||||
}
|
||||
|
||||
function isValidRef(bytes32 l2BlockHash, uint256 ref) public view returns (bool) {
|
||||
if (Layer2.chain.finalizedUTXOs[ref]) {
|
||||
if (Layer2.chain.finalizedUTXORoots[ref]) {
|
||||
return true;
|
||||
}
|
||||
bytes32 parentBlock = l2BlockHash;
|
||||
|
||||
@@ -25,25 +25,27 @@ interface IUserInteractable {
|
||||
|
||||
/**
|
||||
* @notice Users can withdraw notes when only after they're finazlied.
|
||||
* @param note Note hash in layer 2. It is a poseidon hash
|
||||
* @param owner The original owner's address of the note
|
||||
* @param eth Amount of Ether to withdraw out
|
||||
* @param token Token address of ERC20 or ERC721. It can be undefined.
|
||||
* @param amount Amount of ERC20 when the token param is defined and it is an ERC20
|
||||
* @param nft NFT id when the token param is defined and it is an ERC721
|
||||
* @param fee Amount of fee to give to the coordinator
|
||||
* @param root Withdraw notes using recent cached root reference
|
||||
* @param blockHash Finalized block hash to find the finalized withdrawal root
|
||||
* @param leafIndex The index of your withdrawal note's leaf in the given tree.
|
||||
* @param siblings Inclusion proof data
|
||||
*/
|
||||
function withdraw(
|
||||
uint note,
|
||||
address owner,
|
||||
uint eth,
|
||||
address token,
|
||||
uint amount,
|
||||
uint nft,
|
||||
uint fee,
|
||||
bytes32 root,
|
||||
uint128 leafIndex,
|
||||
bytes32 blockHash,
|
||||
uint256 leafIndex,
|
||||
uint[] calldata siblings
|
||||
) external;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ struct Blockchain {
|
||||
/** For inclusion reference */
|
||||
mapping(bytes32=>bytes32) parentOf; // childBlockHash=>parentBlockHash
|
||||
mapping(bytes32=>uint256) utxoRootOf; // header => utxoRoot
|
||||
mapping(uint256=>bool) finalizedUTXOs; // all finalized utxoRoots
|
||||
mapping(uint256=>bool) finalizedUTXORoots; // all finalized utxo roots
|
||||
/** For coordinating */
|
||||
mapping(address=>Proposer) proposers;
|
||||
mapping(bytes32=>Proposal) proposals;
|
||||
@@ -19,11 +19,13 @@ struct Blockchain {
|
||||
mapping(bytes32=>uint) committedDeposits;
|
||||
|
||||
/** For withdrawal */
|
||||
WithdrawalTree[] withdrawalTrees; // withdrawal trees
|
||||
uint[] withdrawalRefs; // works as a linked list
|
||||
uint8 wrIndex; // index for the withdrawal reference linked list
|
||||
mapping(bytes32=>uint256) withdrawalRootOf; // header => utxoRoot
|
||||
// WithdrawalTree[] withdrawalTrees; // withdrawal trees
|
||||
// uint[] withdrawalRefs; // works as a linked list
|
||||
// uint8 wrIndex; // index for the withdrawal reference linked list
|
||||
mapping(bytes32=>bool) withdrawn;
|
||||
mapping(bytes32=>mapping(uint256=>address)) newWithdrawalOwner;
|
||||
uint128 withdrawalTrees;
|
||||
mapping(bytes32=>address) newWithdrawalOwner;
|
||||
/** For migrations */
|
||||
mapping(bytes32=>bool) migrations;
|
||||
// MassMigration[] migrations; // legacy
|
||||
@@ -77,6 +79,7 @@ struct Proposal {
|
||||
bytes32 headerHash;
|
||||
uint challengeDue;
|
||||
bool slashed;
|
||||
bool finalized;
|
||||
}
|
||||
|
||||
struct Challenge {
|
||||
@@ -168,10 +171,6 @@ library Types {
|
||||
function init(Blockchain storage chain, bytes32 genesis) internal {
|
||||
chain.latest = genesis;
|
||||
chain.genesis = genesis;
|
||||
chain.withdrawalTrees.push(); /// withdrawalTrees[0]: initial withdrawalTree tree
|
||||
for (uint i = 0 ; i < 256; i ++) {
|
||||
chain.withdrawalRefs.push(); /// init refs
|
||||
}
|
||||
chain.proposedBlocks++;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,12 +44,16 @@ contract Layer2 is Configurated {
|
||||
return chain.parentOf[header];
|
||||
}
|
||||
|
||||
function utxoRootOf(bytes32 header) public view returns (bytes32) {
|
||||
return bytes32(chain.utxoRootOf[header]);
|
||||
function utxoRootOf(bytes32 header) public view returns (uint256) {
|
||||
return chain.utxoRootOf[header];
|
||||
}
|
||||
|
||||
function finalizedUTXOs(bytes32 utxoRoot) public view returns (bool) {
|
||||
return chain.finalizedUTXOs[uint(utxoRoot)];
|
||||
function withdrawalRootOf(bytes32 header) public view returns (uint256) {
|
||||
return chain.withdrawalRootOf[header];
|
||||
}
|
||||
|
||||
function finalizedUTXORoots(bytes32 utxoRoot) public view returns (bool) {
|
||||
return chain.finalizedUTXORoots[uint(utxoRoot)];
|
||||
}
|
||||
|
||||
function proposers(address addr) public view returns (uint stake, uint reward, uint exitAllowance) {
|
||||
@@ -84,12 +88,6 @@ contract Layer2 is Configurated {
|
||||
return chain.committedDeposits[massDepositHash];
|
||||
}
|
||||
|
||||
function withdrawalTrees(uint idx) public view returns (uint root, uint index) {
|
||||
WithdrawalTree memory withdrawalTree = chain.withdrawalTrees[idx];
|
||||
root = withdrawalTree.root;
|
||||
index = withdrawalTree.index;
|
||||
}
|
||||
|
||||
function withdrawn(bytes32 leaf) public view returns (bool) {
|
||||
return chain.withdrawn[leaf];
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ export const ChallengeableABI = [
|
||||
},
|
||||
{
|
||||
inputs: [{ internalType: 'bytes32', name: 'utxoRoot', type: 'bytes32' }],
|
||||
name: 'finalizedUTXOs',
|
||||
name: 'finalizedUTXORoots',
|
||||
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
@@ -188,13 +188,6 @@ export const ChallengeableABI = [
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: 'snapshotTimestamp',
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: 'stagedDeposits',
|
||||
@@ -215,17 +208,14 @@ export const ChallengeableABI = [
|
||||
{
|
||||
inputs: [{ internalType: 'bytes32', name: 'header', type: 'bytes32' }],
|
||||
name: 'utxoRootOf',
|
||||
outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [{ internalType: 'uint256', name: 'idx', type: 'uint256' }],
|
||||
name: 'withdrawables',
|
||||
outputs: [
|
||||
{ internalType: 'bytes32', name: 'root', type: 'bytes32' },
|
||||
{ internalType: 'uint256', name: 'index', type: 'uint256' },
|
||||
],
|
||||
inputs: [{ internalType: 'bytes32', name: 'header', type: 'bytes32' }],
|
||||
name: 'withdrawalRootOf',
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
|
||||
@@ -153,7 +153,7 @@ export const CoordinatableABI = [
|
||||
},
|
||||
{
|
||||
inputs: [{ internalType: 'bytes32', name: 'utxoRoot', type: 'bytes32' }],
|
||||
name: 'finalizedUTXOs',
|
||||
name: 'finalizedUTXORoots',
|
||||
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
@@ -240,13 +240,6 @@ export const CoordinatableABI = [
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: 'snapshotTimestamp',
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: 'stagedDeposits',
|
||||
@@ -267,17 +260,14 @@ export const CoordinatableABI = [
|
||||
{
|
||||
inputs: [{ internalType: 'bytes32', name: 'header', type: 'bytes32' }],
|
||||
name: 'utxoRootOf',
|
||||
outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [{ internalType: 'uint256', name: 'idx', type: 'uint256' }],
|
||||
name: 'withdrawables',
|
||||
outputs: [
|
||||
{ internalType: 'bytes32', name: 'root', type: 'bytes32' },
|
||||
{ internalType: 'uint256', name: 'index', type: 'uint256' },
|
||||
],
|
||||
inputs: [{ internalType: 'bytes32', name: 'header', type: 'bytes32' }],
|
||||
name: 'withdrawalRootOf',
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
|
||||
@@ -101,7 +101,7 @@ export const DepositChallengeABI = [
|
||||
},
|
||||
{
|
||||
inputs: [{ internalType: 'bytes32', name: 'utxoRoot', type: 'bytes32' }],
|
||||
name: 'finalizedUTXOs',
|
||||
name: 'finalizedUTXORoots',
|
||||
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
@@ -188,13 +188,6 @@ export const DepositChallengeABI = [
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: 'snapshotTimestamp',
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: 'stagedDeposits',
|
||||
@@ -215,17 +208,14 @@ export const DepositChallengeABI = [
|
||||
{
|
||||
inputs: [{ internalType: 'bytes32', name: 'header', type: 'bytes32' }],
|
||||
name: 'utxoRootOf',
|
||||
outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [{ internalType: 'uint256', name: 'idx', type: 'uint256' }],
|
||||
name: 'withdrawables',
|
||||
outputs: [
|
||||
{ internalType: 'bytes32', name: 'root', type: 'bytes32' },
|
||||
{ internalType: 'uint256', name: 'index', type: 'uint256' },
|
||||
],
|
||||
inputs: [{ internalType: 'bytes32', name: 'header', type: 'bytes32' }],
|
||||
name: 'withdrawalRootOf',
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
|
||||
@@ -57,7 +57,7 @@ export const DeserializationTesterABI = [
|
||||
inputs: [{ internalType: 'bytes', name: '', type: 'bytes' }],
|
||||
name: 'getWithdrawalRollUp',
|
||||
outputs: [
|
||||
{ internalType: 'bytes32', name: 'root', type: 'bytes32' },
|
||||
{ internalType: 'uint256', name: 'root', type: 'uint256' },
|
||||
{ internalType: 'uint256', name: 'index', type: 'uint256' },
|
||||
],
|
||||
stateMutability: 'pure',
|
||||
|
||||
@@ -101,7 +101,7 @@ export const HeaderChallengeABI = [
|
||||
},
|
||||
{
|
||||
inputs: [{ internalType: 'bytes32', name: 'utxoRoot', type: 'bytes32' }],
|
||||
name: 'finalizedUTXOs',
|
||||
name: 'finalizedUTXORoots',
|
||||
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
@@ -188,13 +188,6 @@ export const HeaderChallengeABI = [
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: 'snapshotTimestamp',
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: 'stagedDeposits',
|
||||
@@ -215,17 +208,14 @@ export const HeaderChallengeABI = [
|
||||
{
|
||||
inputs: [{ internalType: 'bytes32', name: 'header', type: 'bytes32' }],
|
||||
name: 'utxoRootOf',
|
||||
outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [{ internalType: 'uint256', name: 'idx', type: 'uint256' }],
|
||||
name: 'withdrawables',
|
||||
outputs: [
|
||||
{ internalType: 'bytes32', name: 'root', type: 'bytes32' },
|
||||
{ internalType: 'uint256', name: 'index', type: 'uint256' },
|
||||
],
|
||||
inputs: [{ internalType: 'bytes32', name: 'header', type: 'bytes32' }],
|
||||
name: 'withdrawalRootOf',
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
|
||||
@@ -36,12 +36,14 @@ export const IUserInteractableABI = [
|
||||
},
|
||||
{
|
||||
inputs: [
|
||||
{ internalType: 'uint256', name: 'note', type: 'uint256' },
|
||||
{ internalType: 'address', name: 'owner', type: 'address' },
|
||||
{ internalType: 'uint256', name: 'eth', type: 'uint256' },
|
||||
{ internalType: 'address', name: 'token', type: 'address' },
|
||||
{ internalType: 'uint256', name: 'amount', type: 'uint256' },
|
||||
{ internalType: 'uint256', name: 'nft', type: 'uint256' },
|
||||
{ internalType: 'uint256', name: 'fee', type: 'uint256' },
|
||||
{ internalType: 'uint256', name: 'rootIndex', type: 'uint256' },
|
||||
{ internalType: 'bytes32', name: 'blockHash', type: 'bytes32' },
|
||||
{ internalType: 'uint256', name: 'leafIndex', type: 'uint256' },
|
||||
{ internalType: 'uint256[]', name: 'siblings', type: 'uint256[]' },
|
||||
],
|
||||
@@ -52,20 +54,34 @@ export const IUserInteractableABI = [
|
||||
},
|
||||
{
|
||||
inputs: [
|
||||
{ internalType: 'address', name: 'to', type: 'address' },
|
||||
{ internalType: 'address', name: 'owner', type: 'address' },
|
||||
{ internalType: 'uint256', name: 'eth', type: 'uint256' },
|
||||
{ internalType: 'address', name: 'token', type: 'address' },
|
||||
{ internalType: 'uint256', name: 'amount', type: 'uint256' },
|
||||
{ internalType: 'uint256', name: 'nft', type: 'uint256' },
|
||||
{ internalType: 'uint256', name: 'fee', type: 'uint256' },
|
||||
{ internalType: 'uint256', name: 'rootIndex', type: 'uint256' },
|
||||
{ internalType: 'uint256', name: 'leafIndex', type: 'uint256' },
|
||||
{ internalType: 'uint128', name: 'treeIndex', type: 'uint128' },
|
||||
{ internalType: 'uint128', name: 'leafIndex', type: 'uint128' },
|
||||
{ internalType: 'uint256[]', name: 'siblings', type: 'uint256[]' },
|
||||
{ internalType: 'uint8', name: 'v', type: 'uint8' },
|
||||
{ internalType: 'bytes32', name: 'r', type: 'bytes32' },
|
||||
{ internalType: 'bytes32', name: 's', type: 'bytes32' },
|
||||
],
|
||||
name: 'withdrawUsingSignature',
|
||||
name: 'withdrawArchived',
|
||||
outputs: [],
|
||||
stateMutability: 'nonpayable',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [
|
||||
{ internalType: 'address', name: 'owner', type: 'address' },
|
||||
{ internalType: 'uint256', name: 'eth', type: 'uint256' },
|
||||
{ internalType: 'address', name: 'token', type: 'address' },
|
||||
{ internalType: 'uint256', name: 'amount', type: 'uint256' },
|
||||
{ internalType: 'uint256', name: 'nft', type: 'uint256' },
|
||||
{ internalType: 'uint256', name: 'fee', type: 'uint256' },
|
||||
{ internalType: 'uint128', name: 'treeIndex', type: 'uint128' },
|
||||
{ internalType: 'uint128', name: 'leafIndex', type: 'uint128' },
|
||||
{ internalType: 'bytes', name: 'signature', type: 'bytes' },
|
||||
],
|
||||
name: 'payInAdvance',
|
||||
outputs: [],
|
||||
stateMutability: 'nonpayable',
|
||||
type: 'function',
|
||||
|
||||
@@ -121,13 +121,20 @@ export const Layer2ABI = [
|
||||
{
|
||||
inputs: [{ internalType: 'bytes32', name: 'header', type: 'bytes32' }],
|
||||
name: 'utxoRootOf',
|
||||
outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [{ internalType: 'bytes32', name: 'header', type: 'bytes32' }],
|
||||
name: 'withdrawalRootOf',
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [{ internalType: 'bytes32', name: 'utxoRoot', type: 'bytes32' }],
|
||||
name: 'finalizedUTXOs',
|
||||
name: 'finalizedUTXORoots',
|
||||
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
@@ -187,23 +194,6 @@ export const Layer2ABI = [
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [{ internalType: 'uint256', name: 'idx', type: 'uint256' }],
|
||||
name: 'withdrawables',
|
||||
outputs: [
|
||||
{ internalType: 'bytes32', name: 'root', type: 'bytes32' },
|
||||
{ internalType: 'uint256', name: 'index', type: 'uint256' },
|
||||
],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: 'snapshotTimestamp',
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [{ internalType: 'bytes32', name: 'leaf', type: 'bytes32' }],
|
||||
name: 'withdrawn',
|
||||
|
||||
@@ -102,7 +102,7 @@ export const Layer2ControllerABI = [
|
||||
},
|
||||
{
|
||||
inputs: [{ internalType: 'bytes32', name: 'utxoRoot', type: 'bytes32' }],
|
||||
name: 'finalizedUTXOs',
|
||||
name: 'finalizedUTXORoots',
|
||||
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
@@ -196,13 +196,6 @@ export const Layer2ControllerABI = [
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: 'snapshotTimestamp',
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: 'stagedDeposits',
|
||||
@@ -223,17 +216,14 @@ export const Layer2ControllerABI = [
|
||||
{
|
||||
inputs: [{ internalType: 'bytes32', name: 'header', type: 'bytes32' }],
|
||||
name: 'utxoRootOf',
|
||||
outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [{ internalType: 'uint256', name: 'idx', type: 'uint256' }],
|
||||
name: 'withdrawables',
|
||||
outputs: [
|
||||
{ internalType: 'bytes32', name: 'root', type: 'bytes32' },
|
||||
{ internalType: 'uint256', name: 'index', type: 'uint256' },
|
||||
],
|
||||
inputs: [{ internalType: 'bytes32', name: 'header', type: 'bytes32' }],
|
||||
name: 'withdrawalRootOf',
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
|
||||
@@ -127,7 +127,7 @@ export const MigratableABI = [
|
||||
},
|
||||
{
|
||||
inputs: [{ internalType: 'bytes32', name: 'utxoRoot', type: 'bytes32' }],
|
||||
name: 'finalizedUTXOs',
|
||||
name: 'finalizedUTXORoots',
|
||||
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
@@ -214,13 +214,6 @@ export const MigratableABI = [
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: 'snapshotTimestamp',
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: 'stagedDeposits',
|
||||
@@ -241,17 +234,14 @@ export const MigratableABI = [
|
||||
{
|
||||
inputs: [{ internalType: 'bytes32', name: 'header', type: 'bytes32' }],
|
||||
name: 'utxoRootOf',
|
||||
outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [{ internalType: 'uint256', name: 'idx', type: 'uint256' }],
|
||||
name: 'withdrawables',
|
||||
outputs: [
|
||||
{ internalType: 'bytes32', name: 'root', type: 'bytes32' },
|
||||
{ internalType: 'uint256', name: 'index', type: 'uint256' },
|
||||
],
|
||||
inputs: [{ internalType: 'bytes32', name: 'header', type: 'bytes32' }],
|
||||
name: 'withdrawalRootOf',
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
|
||||
@@ -101,7 +101,7 @@ export const MigrationChallengeABI = [
|
||||
},
|
||||
{
|
||||
inputs: [{ internalType: 'bytes32', name: 'utxoRoot', type: 'bytes32' }],
|
||||
name: 'finalizedUTXOs',
|
||||
name: 'finalizedUTXORoots',
|
||||
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
@@ -188,13 +188,6 @@ export const MigrationChallengeABI = [
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: 'snapshotTimestamp',
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: 'stagedDeposits',
|
||||
@@ -215,17 +208,14 @@ export const MigrationChallengeABI = [
|
||||
{
|
||||
inputs: [{ internalType: 'bytes32', name: 'header', type: 'bytes32' }],
|
||||
name: 'utxoRootOf',
|
||||
outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [{ internalType: 'uint256', name: 'idx', type: 'uint256' }],
|
||||
name: 'withdrawables',
|
||||
outputs: [
|
||||
{ internalType: 'bytes32', name: 'root', type: 'bytes32' },
|
||||
{ internalType: 'uint256', name: 'index', type: 'uint256' },
|
||||
],
|
||||
inputs: [{ internalType: 'bytes32', name: 'header', type: 'bytes32' }],
|
||||
name: 'withdrawalRootOf',
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
|
||||
@@ -101,7 +101,7 @@ export const RollUpChallengeABI = [
|
||||
},
|
||||
{
|
||||
inputs: [{ internalType: 'bytes32', name: 'utxoRoot', type: 'bytes32' }],
|
||||
name: 'finalizedUTXOs',
|
||||
name: 'finalizedUTXORoots',
|
||||
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
@@ -188,13 +188,6 @@ export const RollUpChallengeABI = [
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: 'snapshotTimestamp',
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: 'stagedDeposits',
|
||||
@@ -215,17 +208,14 @@ export const RollUpChallengeABI = [
|
||||
{
|
||||
inputs: [{ internalType: 'bytes32', name: 'header', type: 'bytes32' }],
|
||||
name: 'utxoRootOf',
|
||||
outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [{ internalType: 'uint256', name: 'idx', type: 'uint256' }],
|
||||
name: 'withdrawables',
|
||||
outputs: [
|
||||
{ internalType: 'bytes32', name: 'root', type: 'bytes32' },
|
||||
{ internalType: 'uint256', name: 'index', type: 'uint256' },
|
||||
],
|
||||
inputs: [{ internalType: 'bytes32', name: 'header', type: 'bytes32' }],
|
||||
name: 'withdrawalRootOf',
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
|
||||
@@ -115,7 +115,7 @@ export const RollUpableABI = [
|
||||
},
|
||||
{
|
||||
inputs: [{ internalType: 'bytes32', name: 'utxoRoot', type: 'bytes32' }],
|
||||
name: 'finalizedUTXOs',
|
||||
name: 'finalizedUTXORoots',
|
||||
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
@@ -202,13 +202,6 @@ export const RollUpableABI = [
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: 'snapshotTimestamp',
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: 'stagedDeposits',
|
||||
@@ -229,17 +222,14 @@ export const RollUpableABI = [
|
||||
{
|
||||
inputs: [{ internalType: 'bytes32', name: 'header', type: 'bytes32' }],
|
||||
name: 'utxoRootOf',
|
||||
outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [{ internalType: 'uint256', name: 'idx', type: 'uint256' }],
|
||||
name: 'withdrawables',
|
||||
outputs: [
|
||||
{ internalType: 'bytes32', name: 'root', type: 'bytes32' },
|
||||
{ internalType: 'uint256', name: 'index', type: 'uint256' },
|
||||
],
|
||||
inputs: [{ internalType: 'bytes32', name: 'header', type: 'bytes32' }],
|
||||
name: 'withdrawalRootOf',
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
|
||||
@@ -101,7 +101,7 @@ export const TxChallengeABI = [
|
||||
},
|
||||
{
|
||||
inputs: [{ internalType: 'bytes32', name: 'utxoRoot', type: 'bytes32' }],
|
||||
name: 'finalizedUTXOs',
|
||||
name: 'finalizedUTXORoots',
|
||||
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
@@ -188,13 +188,6 @@ export const TxChallengeABI = [
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: 'snapshotTimestamp',
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: 'stagedDeposits',
|
||||
@@ -215,17 +208,14 @@ export const TxChallengeABI = [
|
||||
{
|
||||
inputs: [{ internalType: 'bytes32', name: 'header', type: 'bytes32' }],
|
||||
name: 'utxoRootOf',
|
||||
outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [{ internalType: 'uint256', name: 'idx', type: 'uint256' }],
|
||||
name: 'withdrawables',
|
||||
outputs: [
|
||||
{ internalType: 'bytes32', name: 'root', type: 'bytes32' },
|
||||
{ internalType: 'uint256', name: 'index', type: 'uint256' },
|
||||
],
|
||||
inputs: [{ internalType: 'bytes32', name: 'header', type: 'bytes32' }],
|
||||
name: 'withdrawalRootOf',
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
|
||||
@@ -135,7 +135,7 @@ export const UserInteractableABI = [
|
||||
},
|
||||
{
|
||||
inputs: [{ internalType: 'bytes32', name: 'utxoRoot', type: 'bytes32' }],
|
||||
name: 'finalizedUTXOs',
|
||||
name: 'finalizedUTXORoots',
|
||||
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
@@ -222,13 +222,6 @@ export const UserInteractableABI = [
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: 'snapshotTimestamp',
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: 'stagedDeposits',
|
||||
@@ -249,17 +242,14 @@ export const UserInteractableABI = [
|
||||
{
|
||||
inputs: [{ internalType: 'bytes32', name: 'header', type: 'bytes32' }],
|
||||
name: 'utxoRootOf',
|
||||
outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [{ internalType: 'uint256', name: 'idx', type: 'uint256' }],
|
||||
name: 'withdrawables',
|
||||
outputs: [
|
||||
{ internalType: 'bytes32', name: 'root', type: 'bytes32' },
|
||||
{ internalType: 'uint256', name: 'index', type: 'uint256' },
|
||||
],
|
||||
inputs: [{ internalType: 'bytes32', name: 'header', type: 'bytes32' }],
|
||||
name: 'withdrawalRootOf',
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
@@ -287,12 +277,14 @@ export const UserInteractableABI = [
|
||||
},
|
||||
{
|
||||
inputs: [
|
||||
{ internalType: 'uint256', name: 'note', type: 'uint256' },
|
||||
{ internalType: 'address', name: 'owner', type: 'address' },
|
||||
{ internalType: 'uint256', name: 'eth', type: 'uint256' },
|
||||
{ internalType: 'address', name: 'token', type: 'address' },
|
||||
{ internalType: 'uint256', name: 'amount', type: 'uint256' },
|
||||
{ internalType: 'uint256', name: 'nft', type: 'uint256' },
|
||||
{ internalType: 'uint256', name: 'fee', type: 'uint256' },
|
||||
{ internalType: 'uint256', name: 'rootIndex', type: 'uint256' },
|
||||
{ internalType: 'bytes32', name: 'blockHash', type: 'bytes32' },
|
||||
{ internalType: 'uint256', name: 'leafIndex', type: 'uint256' },
|
||||
{ internalType: 'uint256[]', name: 'siblings', type: 'uint256[]' },
|
||||
],
|
||||
@@ -303,22 +295,18 @@ export const UserInteractableABI = [
|
||||
},
|
||||
{
|
||||
inputs: [
|
||||
{ internalType: 'address', name: 'to', type: 'address' },
|
||||
{ internalType: 'uint256', name: 'note', type: 'uint256' },
|
||||
{ internalType: 'address', name: 'owner', type: 'address' },
|
||||
{ internalType: 'uint256', name: 'eth', type: 'uint256' },
|
||||
{ internalType: 'address', name: 'token', type: 'address' },
|
||||
{ internalType: 'uint256', name: 'amount', type: 'uint256' },
|
||||
{ internalType: 'uint256', name: 'nft', type: 'uint256' },
|
||||
{ internalType: 'uint256', name: 'fee', type: 'uint256' },
|
||||
{ internalType: 'uint256', name: 'rootIndex', type: 'uint256' },
|
||||
{ internalType: 'uint256', name: 'leafIndex', type: 'uint256' },
|
||||
{ internalType: 'uint256[]', name: 'siblings', type: 'uint256[]' },
|
||||
{ internalType: 'uint8', name: 'v', type: 'uint8' },
|
||||
{ internalType: 'bytes32', name: 'r', type: 'bytes32' },
|
||||
{ internalType: 'bytes32', name: 's', type: 'bytes32' },
|
||||
{ internalType: 'bytes', name: 'signature', type: 'bytes' },
|
||||
],
|
||||
name: 'withdrawUsingSignature',
|
||||
name: 'payInAdvance',
|
||||
outputs: [],
|
||||
stateMutability: 'nonpayable',
|
||||
stateMutability: 'payable',
|
||||
type: 'function',
|
||||
},
|
||||
]
|
||||
|
||||
@@ -140,7 +140,7 @@ export const ZkOptimisticRollUpABI = [
|
||||
},
|
||||
{
|
||||
inputs: [{ internalType: 'bytes32', name: 'utxoRoot', type: 'bytes32' }],
|
||||
name: 'finalizedUTXOs',
|
||||
name: 'finalizedUTXORoots',
|
||||
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
@@ -234,13 +234,6 @@ export const ZkOptimisticRollUpABI = [
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: 'snapshotTimestamp',
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: 'stagedDeposits',
|
||||
@@ -261,17 +254,14 @@ export const ZkOptimisticRollUpABI = [
|
||||
{
|
||||
inputs: [{ internalType: 'bytes32', name: 'header', type: 'bytes32' }],
|
||||
name: 'utxoRootOf',
|
||||
outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [{ internalType: 'uint256', name: 'idx', type: 'uint256' }],
|
||||
name: 'withdrawables',
|
||||
outputs: [
|
||||
{ internalType: 'bytes32', name: 'root', type: 'bytes32' },
|
||||
{ internalType: 'uint256', name: 'index', type: 'uint256' },
|
||||
],
|
||||
inputs: [{ internalType: 'bytes32', name: 'header', type: 'bytes32' }],
|
||||
name: 'withdrawalRootOf',
|
||||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
|
||||
@@ -47,7 +47,7 @@ export class Challengeable extends Contract {
|
||||
massDepositHash: string | number[],
|
||||
): TransactionObject<string>
|
||||
|
||||
finalizedUTXOs(utxoRoot: string | number[]): TransactionObject<boolean>
|
||||
finalizedUTXORoots(utxoRoot: string | number[]): TransactionObject<boolean>
|
||||
|
||||
genesis(): TransactionObject<string>
|
||||
|
||||
@@ -99,8 +99,6 @@ export class Challengeable extends Contract {
|
||||
2: string
|
||||
}>
|
||||
|
||||
snapshotTimestamp(): TransactionObject<string>
|
||||
|
||||
stagedDeposits(): TransactionObject<{
|
||||
merged: string
|
||||
fee: string
|
||||
@@ -112,14 +110,7 @@ export class Challengeable extends Contract {
|
||||
|
||||
utxoRootOf(header: string | number[]): TransactionObject<string>
|
||||
|
||||
withdrawables(
|
||||
idx: number | string,
|
||||
): TransactionObject<{
|
||||
root: string
|
||||
index: string
|
||||
0: string
|
||||
1: string
|
||||
}>
|
||||
withdrawalRootOf(header: string | number[]): TransactionObject<string>
|
||||
|
||||
withdrawn(leaf: string | number[]): TransactionObject<boolean>
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ export class Coordinatable extends Contract {
|
||||
massDepositHash: string | number[],
|
||||
): TransactionObject<string>
|
||||
|
||||
finalizedUTXOs(utxoRoot: string | number[]): TransactionObject<boolean>
|
||||
finalizedUTXORoots(utxoRoot: string | number[]): TransactionObject<boolean>
|
||||
|
||||
genesis(): TransactionObject<string>
|
||||
|
||||
@@ -99,8 +99,6 @@ export class Coordinatable extends Contract {
|
||||
2: string
|
||||
}>
|
||||
|
||||
snapshotTimestamp(): TransactionObject<string>
|
||||
|
||||
stagedDeposits(): TransactionObject<{
|
||||
merged: string
|
||||
fee: string
|
||||
@@ -112,14 +110,7 @@ export class Coordinatable extends Contract {
|
||||
|
||||
utxoRootOf(header: string | number[]): TransactionObject<string>
|
||||
|
||||
withdrawables(
|
||||
idx: number | string,
|
||||
): TransactionObject<{
|
||||
root: string
|
||||
index: string
|
||||
0: string
|
||||
1: string
|
||||
}>
|
||||
withdrawalRootOf(header: string | number[]): TransactionObject<string>
|
||||
|
||||
withdrawn(leaf: string | number[]): TransactionObject<boolean>
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ export class DepositChallenge extends Contract {
|
||||
massDepositHash: string | number[],
|
||||
): TransactionObject<string>
|
||||
|
||||
finalizedUTXOs(utxoRoot: string | number[]): TransactionObject<boolean>
|
||||
finalizedUTXORoots(utxoRoot: string | number[]): TransactionObject<boolean>
|
||||
|
||||
genesis(): TransactionObject<string>
|
||||
|
||||
@@ -99,8 +99,6 @@ export class DepositChallenge extends Contract {
|
||||
2: string
|
||||
}>
|
||||
|
||||
snapshotTimestamp(): TransactionObject<string>
|
||||
|
||||
stagedDeposits(): TransactionObject<{
|
||||
merged: string
|
||||
fee: string
|
||||
@@ -112,14 +110,7 @@ export class DepositChallenge extends Contract {
|
||||
|
||||
utxoRootOf(header: string | number[]): TransactionObject<string>
|
||||
|
||||
withdrawables(
|
||||
idx: number | string,
|
||||
): TransactionObject<{
|
||||
root: string
|
||||
index: string
|
||||
0: string
|
||||
1: string
|
||||
}>
|
||||
withdrawalRootOf(header: string | number[]): TransactionObject<string>
|
||||
|
||||
withdrawn(leaf: string | number[]): TransactionObject<boolean>
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ export class HeaderChallenge extends Contract {
|
||||
massDepositHash: string | number[],
|
||||
): TransactionObject<string>
|
||||
|
||||
finalizedUTXOs(utxoRoot: string | number[]): TransactionObject<boolean>
|
||||
finalizedUTXORoots(utxoRoot: string | number[]): TransactionObject<boolean>
|
||||
|
||||
genesis(): TransactionObject<string>
|
||||
|
||||
@@ -99,8 +99,6 @@ export class HeaderChallenge extends Contract {
|
||||
2: string
|
||||
}>
|
||||
|
||||
snapshotTimestamp(): TransactionObject<string>
|
||||
|
||||
stagedDeposits(): TransactionObject<{
|
||||
merged: string
|
||||
fee: string
|
||||
@@ -112,14 +110,7 @@ export class HeaderChallenge extends Contract {
|
||||
|
||||
utxoRootOf(header: string | number[]): TransactionObject<string>
|
||||
|
||||
withdrawables(
|
||||
idx: number | string,
|
||||
): TransactionObject<{
|
||||
root: string
|
||||
index: string
|
||||
0: string
|
||||
1: string
|
||||
}>
|
||||
withdrawalRootOf(header: string | number[]): TransactionObject<string>
|
||||
|
||||
withdrawn(leaf: string | number[]): TransactionObject<boolean>
|
||||
|
||||
|
||||
@@ -28,29 +28,40 @@ export class IUserInteractable extends Contract {
|
||||
): TransactionObject<void>
|
||||
|
||||
withdraw(
|
||||
note: number | string,
|
||||
owner: string,
|
||||
eth: number | string,
|
||||
token: string,
|
||||
amount: number | string,
|
||||
nft: number | string,
|
||||
fee: number | string,
|
||||
rootIndex: number | string,
|
||||
blockHash: string | number[],
|
||||
leafIndex: number | string,
|
||||
siblings: (number | string)[],
|
||||
): TransactionObject<void>
|
||||
|
||||
withdrawUsingSignature(
|
||||
to: string,
|
||||
withdrawArchived(
|
||||
owner: string,
|
||||
eth: number | string,
|
||||
token: string,
|
||||
amount: number | string,
|
||||
nft: number | string,
|
||||
fee: number | string,
|
||||
rootIndex: number | string,
|
||||
treeIndex: number | string,
|
||||
leafIndex: number | string,
|
||||
siblings: (number | string)[],
|
||||
v: number | string,
|
||||
r: string | number[],
|
||||
s: string | number[],
|
||||
): TransactionObject<void>
|
||||
|
||||
payInAdvance(
|
||||
owner: string,
|
||||
eth: number | string,
|
||||
token: string,
|
||||
amount: number | string,
|
||||
nft: number | string,
|
||||
fee: number | string,
|
||||
treeIndex: number | string,
|
||||
leafIndex: number | string,
|
||||
signature: string | number[],
|
||||
): TransactionObject<void>
|
||||
}
|
||||
events: {
|
||||
|
||||
15
packages/contracts/src/contracts/Layer2.d.ts
vendored
15
packages/contracts/src/contracts/Layer2.d.ts
vendored
@@ -53,7 +53,9 @@ export class Layer2 extends Contract {
|
||||
|
||||
utxoRootOf(header: string | number[]): TransactionObject<string>
|
||||
|
||||
finalizedUTXOs(utxoRoot: string | number[]): TransactionObject<boolean>
|
||||
withdrawalRootOf(header: string | number[]): TransactionObject<string>
|
||||
|
||||
finalizedUTXORoots(utxoRoot: string | number[]): TransactionObject<boolean>
|
||||
|
||||
proposers(
|
||||
addr: string,
|
||||
@@ -92,17 +94,6 @@ export class Layer2 extends Contract {
|
||||
massDepositHash: string | number[],
|
||||
): TransactionObject<string>
|
||||
|
||||
withdrawables(
|
||||
idx: number | string,
|
||||
): TransactionObject<{
|
||||
root: string
|
||||
index: string
|
||||
0: string
|
||||
1: string
|
||||
}>
|
||||
|
||||
snapshotTimestamp(): TransactionObject<string>
|
||||
|
||||
withdrawn(leaf: string | number[]): TransactionObject<boolean>
|
||||
|
||||
migrations(migrationHash: string | number[]): TransactionObject<boolean>
|
||||
|
||||
@@ -47,7 +47,7 @@ export class Layer2Controller extends Contract {
|
||||
massDepositHash: string | number[],
|
||||
): TransactionObject<string>
|
||||
|
||||
finalizedUTXOs(utxoRoot: string | number[]): TransactionObject<boolean>
|
||||
finalizedUTXORoots(utxoRoot: string | number[]): TransactionObject<boolean>
|
||||
|
||||
genesis(): TransactionObject<string>
|
||||
|
||||
@@ -101,8 +101,6 @@ export class Layer2Controller extends Contract {
|
||||
|
||||
proxied(arg0: string | number[]): TransactionObject<string>
|
||||
|
||||
snapshotTimestamp(): TransactionObject<string>
|
||||
|
||||
stagedDeposits(): TransactionObject<{
|
||||
merged: string
|
||||
fee: string
|
||||
@@ -114,14 +112,7 @@ export class Layer2Controller extends Contract {
|
||||
|
||||
utxoRootOf(header: string | number[]): TransactionObject<string>
|
||||
|
||||
withdrawables(
|
||||
idx: number | string,
|
||||
): TransactionObject<{
|
||||
root: string
|
||||
index: string
|
||||
0: string
|
||||
1: string
|
||||
}>
|
||||
withdrawalRootOf(header: string | number[]): TransactionObject<string>
|
||||
|
||||
withdrawn(leaf: string | number[]): TransactionObject<boolean>
|
||||
}
|
||||
|
||||
13
packages/contracts/src/contracts/Migratable.d.ts
vendored
13
packages/contracts/src/contracts/Migratable.d.ts
vendored
@@ -47,7 +47,7 @@ export class Migratable extends Contract {
|
||||
massDepositHash: string | number[],
|
||||
): TransactionObject<string>
|
||||
|
||||
finalizedUTXOs(utxoRoot: string | number[]): TransactionObject<boolean>
|
||||
finalizedUTXORoots(utxoRoot: string | number[]): TransactionObject<boolean>
|
||||
|
||||
genesis(): TransactionObject<string>
|
||||
|
||||
@@ -99,8 +99,6 @@ export class Migratable extends Contract {
|
||||
2: string
|
||||
}>
|
||||
|
||||
snapshotTimestamp(): TransactionObject<string>
|
||||
|
||||
stagedDeposits(): TransactionObject<{
|
||||
merged: string
|
||||
fee: string
|
||||
@@ -112,14 +110,7 @@ export class Migratable extends Contract {
|
||||
|
||||
utxoRootOf(header: string | number[]): TransactionObject<string>
|
||||
|
||||
withdrawables(
|
||||
idx: number | string,
|
||||
): TransactionObject<{
|
||||
root: string
|
||||
index: string
|
||||
0: string
|
||||
1: string
|
||||
}>
|
||||
withdrawalRootOf(header: string | number[]): TransactionObject<string>
|
||||
|
||||
withdrawn(leaf: string | number[]): TransactionObject<boolean>
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ export class MigrationChallenge extends Contract {
|
||||
massDepositHash: string | number[],
|
||||
): TransactionObject<string>
|
||||
|
||||
finalizedUTXOs(utxoRoot: string | number[]): TransactionObject<boolean>
|
||||
finalizedUTXORoots(utxoRoot: string | number[]): TransactionObject<boolean>
|
||||
|
||||
genesis(): TransactionObject<string>
|
||||
|
||||
@@ -99,8 +99,6 @@ export class MigrationChallenge extends Contract {
|
||||
2: string
|
||||
}>
|
||||
|
||||
snapshotTimestamp(): TransactionObject<string>
|
||||
|
||||
stagedDeposits(): TransactionObject<{
|
||||
merged: string
|
||||
fee: string
|
||||
@@ -112,14 +110,7 @@ export class MigrationChallenge extends Contract {
|
||||
|
||||
utxoRootOf(header: string | number[]): TransactionObject<string>
|
||||
|
||||
withdrawables(
|
||||
idx: number | string,
|
||||
): TransactionObject<{
|
||||
root: string
|
||||
index: string
|
||||
0: string
|
||||
1: string
|
||||
}>
|
||||
withdrawalRootOf(header: string | number[]): TransactionObject<string>
|
||||
|
||||
withdrawn(leaf: string | number[]): TransactionObject<boolean>
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ export class RollUpChallenge extends Contract {
|
||||
massDepositHash: string | number[],
|
||||
): TransactionObject<string>
|
||||
|
||||
finalizedUTXOs(utxoRoot: string | number[]): TransactionObject<boolean>
|
||||
finalizedUTXORoots(utxoRoot: string | number[]): TransactionObject<boolean>
|
||||
|
||||
genesis(): TransactionObject<string>
|
||||
|
||||
@@ -99,8 +99,6 @@ export class RollUpChallenge extends Contract {
|
||||
2: string
|
||||
}>
|
||||
|
||||
snapshotTimestamp(): TransactionObject<string>
|
||||
|
||||
stagedDeposits(): TransactionObject<{
|
||||
merged: string
|
||||
fee: string
|
||||
@@ -112,14 +110,7 @@ export class RollUpChallenge extends Contract {
|
||||
|
||||
utxoRootOf(header: string | number[]): TransactionObject<string>
|
||||
|
||||
withdrawables(
|
||||
idx: number | string,
|
||||
): TransactionObject<{
|
||||
root: string
|
||||
index: string
|
||||
0: string
|
||||
1: string
|
||||
}>
|
||||
withdrawalRootOf(header: string | number[]): TransactionObject<string>
|
||||
|
||||
withdrawn(leaf: string | number[]): TransactionObject<boolean>
|
||||
|
||||
|
||||
13
packages/contracts/src/contracts/RollUpable.d.ts
vendored
13
packages/contracts/src/contracts/RollUpable.d.ts
vendored
@@ -47,7 +47,7 @@ export class RollUpable extends Contract {
|
||||
massDepositHash: string | number[],
|
||||
): TransactionObject<string>
|
||||
|
||||
finalizedUTXOs(utxoRoot: string | number[]): TransactionObject<boolean>
|
||||
finalizedUTXORoots(utxoRoot: string | number[]): TransactionObject<boolean>
|
||||
|
||||
genesis(): TransactionObject<string>
|
||||
|
||||
@@ -99,8 +99,6 @@ export class RollUpable extends Contract {
|
||||
2: string
|
||||
}>
|
||||
|
||||
snapshotTimestamp(): TransactionObject<string>
|
||||
|
||||
stagedDeposits(): TransactionObject<{
|
||||
merged: string
|
||||
fee: string
|
||||
@@ -112,14 +110,7 @@ export class RollUpable extends Contract {
|
||||
|
||||
utxoRootOf(header: string | number[]): TransactionObject<string>
|
||||
|
||||
withdrawables(
|
||||
idx: number | string,
|
||||
): TransactionObject<{
|
||||
root: string
|
||||
index: string
|
||||
0: string
|
||||
1: string
|
||||
}>
|
||||
withdrawalRootOf(header: string | number[]): TransactionObject<string>
|
||||
|
||||
withdrawn(leaf: string | number[]): TransactionObject<boolean>
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ export class TxChallenge extends Contract {
|
||||
massDepositHash: string | number[],
|
||||
): TransactionObject<string>
|
||||
|
||||
finalizedUTXOs(utxoRoot: string | number[]): TransactionObject<boolean>
|
||||
finalizedUTXORoots(utxoRoot: string | number[]): TransactionObject<boolean>
|
||||
|
||||
genesis(): TransactionObject<string>
|
||||
|
||||
@@ -99,8 +99,6 @@ export class TxChallenge extends Contract {
|
||||
2: string
|
||||
}>
|
||||
|
||||
snapshotTimestamp(): TransactionObject<string>
|
||||
|
||||
stagedDeposits(): TransactionObject<{
|
||||
merged: string
|
||||
fee: string
|
||||
@@ -112,14 +110,7 @@ export class TxChallenge extends Contract {
|
||||
|
||||
utxoRootOf(header: string | number[]): TransactionObject<string>
|
||||
|
||||
withdrawables(
|
||||
idx: number | string,
|
||||
): TransactionObject<{
|
||||
root: string
|
||||
index: string
|
||||
0: string
|
||||
1: string
|
||||
}>
|
||||
withdrawalRootOf(header: string | number[]): TransactionObject<string>
|
||||
|
||||
withdrawn(leaf: string | number[]): TransactionObject<boolean>
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ export class UserInteractable extends Contract {
|
||||
massDepositHash: string | number[],
|
||||
): TransactionObject<string>
|
||||
|
||||
finalizedUTXOs(utxoRoot: string | number[]): TransactionObject<boolean>
|
||||
finalizedUTXORoots(utxoRoot: string | number[]): TransactionObject<boolean>
|
||||
|
||||
genesis(): TransactionObject<string>
|
||||
|
||||
@@ -103,8 +103,6 @@ export class UserInteractable extends Contract {
|
||||
2: string
|
||||
}>
|
||||
|
||||
snapshotTimestamp(): TransactionObject<string>
|
||||
|
||||
stagedDeposits(): TransactionObject<{
|
||||
merged: string
|
||||
fee: string
|
||||
@@ -116,14 +114,7 @@ export class UserInteractable extends Contract {
|
||||
|
||||
utxoRootOf(header: string | number[]): TransactionObject<string>
|
||||
|
||||
withdrawables(
|
||||
idx: number | string,
|
||||
): TransactionObject<{
|
||||
root: string
|
||||
index: string
|
||||
0: string
|
||||
1: string
|
||||
}>
|
||||
withdrawalRootOf(header: string | number[]): TransactionObject<string>
|
||||
|
||||
withdrawn(leaf: string | number[]): TransactionObject<boolean>
|
||||
|
||||
@@ -138,29 +129,27 @@ export class UserInteractable extends Contract {
|
||||
): TransactionObject<void>
|
||||
|
||||
withdraw(
|
||||
note: number | string,
|
||||
owner: string,
|
||||
eth: number | string,
|
||||
token: string,
|
||||
amount: number | string,
|
||||
nft: number | string,
|
||||
fee: number | string,
|
||||
rootIndex: number | string,
|
||||
blockHash: string | number[],
|
||||
leafIndex: number | string,
|
||||
siblings: (number | string)[],
|
||||
): TransactionObject<void>
|
||||
|
||||
withdrawUsingSignature(
|
||||
to: string,
|
||||
payInAdvance(
|
||||
note: number | string,
|
||||
owner: string,
|
||||
eth: number | string,
|
||||
token: string,
|
||||
amount: number | string,
|
||||
nft: number | string,
|
||||
fee: number | string,
|
||||
rootIndex: number | string,
|
||||
leafIndex: number | string,
|
||||
siblings: (number | string)[],
|
||||
v: number | string,
|
||||
r: string | number[],
|
||||
s: string | number[],
|
||||
signature: string | number[],
|
||||
): TransactionObject<void>
|
||||
}
|
||||
events: {
|
||||
|
||||
@@ -47,7 +47,7 @@ export class ZkOptimisticRollUp extends Contract {
|
||||
massDepositHash: string | number[],
|
||||
): TransactionObject<string>
|
||||
|
||||
finalizedUTXOs(utxoRoot: string | number[]): TransactionObject<boolean>
|
||||
finalizedUTXORoots(utxoRoot: string | number[]): TransactionObject<boolean>
|
||||
|
||||
genesis(): TransactionObject<string>
|
||||
|
||||
@@ -101,8 +101,6 @@ export class ZkOptimisticRollUp extends Contract {
|
||||
|
||||
proxied(arg0: string | number[]): TransactionObject<string>
|
||||
|
||||
snapshotTimestamp(): TransactionObject<string>
|
||||
|
||||
stagedDeposits(): TransactionObject<{
|
||||
merged: string
|
||||
fee: string
|
||||
@@ -114,14 +112,7 @@ export class ZkOptimisticRollUp extends Contract {
|
||||
|
||||
utxoRootOf(header: string | number[]): TransactionObject<string>
|
||||
|
||||
withdrawables(
|
||||
idx: number | string,
|
||||
): TransactionObject<{
|
||||
root: string
|
||||
index: string
|
||||
0: string
|
||||
1: string
|
||||
}>
|
||||
withdrawalRootOf(header: string | number[]): TransactionObject<string>
|
||||
|
||||
withdrawn(leaf: string | number[]): TransactionObject<boolean>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user