Skip to content

@lelantos-org/sdk / advanced / 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: "inner";
        type: "bytes32";
      }, {
        name: "feeAssetId";
        type: "uint64";
      }, {
        name: "feeIn";
        type: "uint64";
      }, {
        name: "feeInner";
        type: "bytes32";
     }];
     name: "d";
     type: "tuple";
   }, {
     components: readonly [{
        name: "clueRx";
        type: "uint256";
      }, {
        name: "clueRy";
        type: "uint256";
      }, {
        name: "clueQx";
        type: "uint256";
      }, {
        name: "clueQy";
        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: "clueQx";
        type: "uint256";
      }, {
        name: "clueQy";
        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: "inner";
     type: "bytes32";
   }, {
     name: "publicAssetId";
     type: "uint64";
   }, {
     name: "fbps";
     type: "uint16";
   }, {
     name: "submittedAt";
     type: "uint32";
   }, {
     components: readonly [{
        name: "feeIn";
        type: "uint48";
      }, {
        name: "feeAssetId";
        type: "uint64";
      }, {
        name: "feeInner";
        type: "bytes32";
     }];
     name: "feeNote";
     type: "tuple";
   }, {
     name: "pulled";
     type: "uint256";
  }];
  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:508

NativeAdapter: the native-coin bridge for the ERC-20-only pool, deployed at its own address.

The adapter wraps on the way in and unwraps on the way out. A native deposit is sent to it with d.payer set to the adapter, the party the pool pulls from and refunds.

Such an escrow is cancelled through cancelNative: MASP.cancelDeposit refunds the digest-bound payer, only a contract payer itself may cancel its deposits, and the adapter's escrows mapping is the only record of who funded the escrow.