updatePair

param of pairParam -> storage with upd [ pairName, pairId, tokensDecimals ]

type pairParam          is [@layout:comb] record [
  tokenId               : tokenId;
  pairName              : string;
  decimals              : nat;
]

Updates mapping of tokenId <-> pairName in storage pairName and pairId maps and updates tokensDecimals[param.pairName].

Usage

const tokenId = 0; // or new BigNumber(0) or "0"
const pairName = "XTZ-USD";
const tokenDecimal = Math.pow(10, 6);
const proxy = await tezos.contract.at(proxyAddress);
const operation = await proxy.methods.updatePair(
    tokenId, 
    pairName, 
    tokenDecimal
).send();
await operation.confirmation();

Last updated