Skip to content

@lelantos-org/sdk / chain / NATIVE_ADAPTER_ABI

Variable: NATIVE_ADAPTER_ABI โ€‹

ts
const NATIVE_ADAPTER_ABI: readonly [{
  inputs: readonly [];
  name: "POOL";
  outputs: readonly [{
     type: "address";
  }];
  stateMutability: "view";
  type: "function";
}, {
  inputs: readonly [];
  name: "WRAPPED_NATIVE";
  outputs: readonly [{
     type: "address";
  }];
  stateMutability: "view";
  type: "function";
}, {
  inputs: readonly [{
     name: "id";
     type: "uint256";
  }];
  name: "escrows";
  outputs: readonly [{
     name: "refundTo";
     type: "address";
   }, {
     name: "amount";
     type: "uint256";
  }];
  stateMutability: "view";
  type: "function";
}, {
  inputs: readonly [{
     components: readonly [{
        name: "chainId";
        type: "uint256";
      }, {
        name: "publicAssetId";
        type: "uint64";
      }, {
        name: "publicIn";
        type: "uint64";
      }, {
        name: "payer";
        type: "address";
      }, {
        name: "recipient";
        type: "address";
      }, {
        name: "outCm";
        type: "bytes32";
      }, {
        name: "cvDep";
        type: "uint256[2]";
      }, {
        name: "rcv";
        type: "uint256";
      }, {
        name: "feeIn";
        type: "uint64";
      }, {
        name: "feeCm";
        type: "bytes32";
      }, {
        name: "feeCvDep";
        type: "uint256[2]";
      }, {
        name: "feeRcv";
        type: "uint256";
     }];
     name: "d";
     type: "tuple";
   }, {
     components: readonly [{
        name: "clueRx";
        type: "uint256";
      }, {
        name: "clueRy";
        type: "uint256";
      }, {
        name: "ephPubX";
        type: "uint256";
      }, {
        name: "ephPubY";
        type: "uint256";
      }, {
        name: "ciphertext";
        type: "bytes";
     }];
     name: "aux";
     type: "tuple";
   }, {
     components: readonly [{
        name: "clueRx";
        type: "uint256";
      }, {
        name: "clueRy";
        type: "uint256";
      }, {
        name: "ephPubX";
        type: "uint256";
      }, {
        name: "ephPubY";
        type: "uint256";
      }, {
        name: "ciphertext";
        type: "bytes";
     }];
     name: "feeAux";
     type: "tuple";
  }];
  name: "depositNative";
  outputs: readonly [{
     name: "id";
     type: "uint256";
  }];
  stateMutability: "payable";
  type: "function";
}, {
  inputs: readonly [{
     name: "id";
     type: "uint256";
   }, {
     name: "publicIn";
     type: "uint48";
   }, {
     name: "cm";
     type: "bytes32";
   }, {
     name: "cvDep";
     type: "uint256[2]";
   }, {
     name: "publicAssetId";
     type: "uint64";
   }, {
     name: "fbps";
     type: "uint16";
   }, {
     name: "submittedAt";
     type: "uint32";
   }, {
     components: readonly [{
        name: "feeIn";
        type: "uint48";
      }, {
        name: "feeCm";
        type: "bytes32";
      }, {
        name: "feeCvDep";
        type: "uint256[2]";
     }];
     name: "feeNote";
     type: "tuple";
  }];
  name: "cancelNative";
  outputs: readonly [];
  stateMutability: "nonpayable";
  type: "function";
}, {
  inputs: readonly [{
     indexed: true;
     name: "id";
     type: "uint256";
   }, {
     indexed: true;
     name: "refundTo";
     type: "address";
   }, {
     name: "escrowed";
     type: "uint256";
   }, {
     name: "returned";
     type: "uint256";
  }];
  name: "NativeDeposited";
  type: "event";
}, {
  inputs: readonly [{
     indexed: true;
     name: "id";
     type: "uint256";
   }, {
     indexed: true;
     name: "refundTo";
     type: "address";
   }, {
     name: "amount";
     type: "uint256";
  }];
  name: "NativeRefunded";
  type: "event";
}];

Defined in: @lelantos-org/sdk/dist/chain/viem/abi.d.ts:426

NativeAdapter โ€” the native-coin bridge for an ERC-20-only MASP.

The pool never sees native coin: the adapter wraps on the way in and unwraps on the way out. That makes it a second contract address, not a second entry point, so a native deposit is sent here rather than to the pool, and d.payer must be the adapter โ€” it is the party the pool pulls from and refunds.

cancelNative exists because of that ownership: MASP.cancelDeposit refunds the digest-bound payer, which for these escrows is the adapter, and the pool restricts contract payers to cancelling their own deposits. The adapter's own escrows mapping is the only record of who funded the escrow, so it is the only path that can return the coin.

Lelantosno cookies ๐Ÿช ยท no tracking ๐Ÿ‘๏ธ ยท no accounts ๐Ÿ‘คwalletexplorer4536080GitHub