UNPKG

@layerzerolabs/oft-evm

Version:

LayerZero Labs reference EVM OmniChain Fungible Token (OFT) implementation

1 lines 15.1 kB
{"abi":[{"type":"function","name":"BPS_DENOMINATOR","inputs":[],"outputs":[{"name":"","type":"uint16","internalType":"uint16"}],"stateMutability":"view"},{"type":"function","name":"defaultFeeBps","inputs":[],"outputs":[{"name":"","type":"uint16","internalType":"uint16"}],"stateMutability":"view"},{"type":"function","name":"feeBps","inputs":[{"name":"dstEid","type":"uint32","internalType":"uint32"}],"outputs":[{"name":"feeBps","type":"uint16","internalType":"uint16"},{"name":"enabled","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"getFee","inputs":[{"name":"_dstEid","type":"uint32","internalType":"uint32"},{"name":"_amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"renounceOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setDefaultFeeBps","inputs":[{"name":"_feeBps","type":"uint16","internalType":"uint16"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setFeeBps","inputs":[{"name":"_dstEid","type":"uint32","internalType":"uint32"},{"name":"_feeBps","type":"uint16","internalType":"uint16"},{"name":"_enabled","type":"bool","internalType":"bool"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"transferOwnership","inputs":[{"name":"newOwner","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"DefaultFeeBpsSet","inputs":[{"name":"feeBps","type":"uint16","indexed":false,"internalType":"uint16"}],"anonymous":false},{"type":"event","name":"FeeBpsSet","inputs":[{"name":"dstEid","type":"uint32","indexed":false,"internalType":"uint32"},{"name":"feeBps","type":"uint16","indexed":false,"internalType":"uint16"},{"name":"enabled","type":"bool","indexed":false,"internalType":"bool"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"previousOwner","type":"address","indexed":true,"internalType":"address"},{"name":"newOwner","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"error","name":"InvalidBps","inputs":[]},{"type":"error","name":"InvalidFeeOwner","inputs":[]},{"type":"error","name":"OwnableInvalidOwner","inputs":[{"name":"owner","type":"address","internalType":"address"}]},{"type":"error","name":"OwnableUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"}]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"BPS_DENOMINATOR()":"e1a45218","defaultFeeBps()":"bcae25a4","feeBps(uint32)":"3194c180","getFee(uint32,uint256)":"5bf9c226","owner()":"8da5cb5b","renounceOwnership()":"715018a6","setDefaultFeeBps(uint16)":"4488b652","setFeeBps(uint32,uint16,bool)":"6db7bcdb","transferOwnership(address)":"f2fde38b"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.22+commit.4fc1097e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"InvalidBps\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidFeeOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"feeBps\",\"type\":\"uint16\"}],\"name\":\"DefaultFeeBpsSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"dstEid\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"feeBps\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"FeeBpsSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BPS_DENOMINATOR\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"defaultFeeBps\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"dstEid\",\"type\":\"uint32\"}],\"name\":\"feeBps\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"feeBps\",\"type\":\"uint16\"},{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_dstEid\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"getFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_feeBps\",\"type\":\"uint16\"}],\"name\":\"setDefaultFeeBps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_dstEid\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"_feeBps\",\"type\":\"uint16\"},{\"internalType\":\"bool\",\"name\":\"_enabled\",\"type\":\"bool\"}],\"name\":\"setFeeBps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"kind\":\"dev\",\"methods\":{\"getFee(uint32,uint256)\":{\"details\":\"Returns the fee for a specific destination LayerZero EndpointV2 ID.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"setDefaultFeeBps(uint16)\":{\"details\":\"Sets the default fee basis points (BPS) for all destinations.\"},\"setFeeBps(uint32,uint16,bool)\":{\"details\":\"Sets the fee basis points (BPS) for a specific destination LayerZero EndpointV2 ID.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"stateVariables\":{\"defaultFeeBps\":{\"details\":\"Default fee basis points (BPS) for all destinations.\"},\"feeBps\":{\"details\":\"Fee configuration for a specific destination LayerZero endpoint ID.\"}},\"title\":\"Fee\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Implements fee configuration and calculation.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Fee.sol\":\"Fee\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":20000},\"remappings\":[\":@layerzerolabs/=node_modules/@layerzerolabs/\",\":@openzeppelin/=node_modules/@openzeppelin/\",\":ds-test/=node_modules/@layerzerolabs/toolbox-foundry/lib/ds-test/\",\":forge-std/=node_modules/@layerzerolabs/toolbox-foundry/lib/forge-std/\",\":solidity-bytes-utils/contracts/=node_modules/@layerzerolabs/toolbox-foundry/lib/solidity-bytes-utils/\"]},\"sources\":{\"contracts/Fee.sol\":{\"keccak256\":\"0x23577492bb3451678efc299cc5ea5552eb98e97998f77e2f076acbc02659bbf0\",\"urls\":[\"bzz-raw://ff0ee4eb1c8a74468a3684df552477bc0ba706ff50fcc1bbb1452dc29922a05d\",\"dweb:/ipfs/QmZmpqYVT7GydPnXzzNGfUCEbBQzQuJsV9USfZWjoqJ9DJ\"]},\"contracts/interfaces/IFee.sol\":{\"keccak256\":\"0x548eab6ed7c925c9769b6bed6416bb67643338b1785c34491d90ac3b3ad00bc3\",\"urls\":[\"bzz-raw://84e16d44b5e323573b81e7bcd196829b80d9634e48768a2445b872fd1c4ba234\",\"dweb:/ipfs/QmbawDMDYnEXMCenaZjWiBdcRGnDuH1HmnQSt5h1iNN2Wi\"]},\"node_modules/@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6\",\"dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a\"]},\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.22+commit.4fc1097e"},"language":"Solidity","output":{"abi":[{"inputs":[],"type":"error","name":"InvalidBps"},{"inputs":[],"type":"error","name":"InvalidFeeOwner"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"type":"error","name":"OwnableInvalidOwner"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"type":"error","name":"OwnableUnauthorizedAccount"},{"inputs":[{"internalType":"uint16","name":"feeBps","type":"uint16","indexed":false}],"type":"event","name":"DefaultFeeBpsSet","anonymous":false},{"inputs":[{"internalType":"uint32","name":"dstEid","type":"uint32","indexed":false},{"internalType":"uint16","name":"feeBps","type":"uint16","indexed":false},{"internalType":"bool","name":"enabled","type":"bool","indexed":false}],"type":"event","name":"FeeBpsSet","anonymous":false},{"inputs":[{"internalType":"address","name":"previousOwner","type":"address","indexed":true},{"internalType":"address","name":"newOwner","type":"address","indexed":true}],"type":"event","name":"OwnershipTransferred","anonymous":false},{"inputs":[],"stateMutability":"view","type":"function","name":"BPS_DENOMINATOR","outputs":[{"internalType":"uint16","name":"","type":"uint16"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"defaultFeeBps","outputs":[{"internalType":"uint16","name":"","type":"uint16"}]},{"inputs":[{"internalType":"uint32","name":"dstEid","type":"uint32"}],"stateMutability":"view","type":"function","name":"feeBps","outputs":[{"internalType":"uint16","name":"feeBps","type":"uint16"},{"internalType":"bool","name":"enabled","type":"bool"}]},{"inputs":[{"internalType":"uint32","name":"_dstEid","type":"uint32"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"stateMutability":"view","type":"function","name":"getFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}]},{"inputs":[],"stateMutability":"nonpayable","type":"function","name":"renounceOwnership"},{"inputs":[{"internalType":"uint16","name":"_feeBps","type":"uint16"}],"stateMutability":"nonpayable","type":"function","name":"setDefaultFeeBps"},{"inputs":[{"internalType":"uint32","name":"_dstEid","type":"uint32"},{"internalType":"uint16","name":"_feeBps","type":"uint16"},{"internalType":"bool","name":"_enabled","type":"bool"}],"stateMutability":"nonpayable","type":"function","name":"setFeeBps"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"transferOwnership"}],"devdoc":{"kind":"dev","methods":{"getFee(uint32,uint256)":{"details":"Returns the fee for a specific destination LayerZero EndpointV2 ID."},"owner()":{"details":"Returns the address of the current owner."},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner."},"setDefaultFeeBps(uint16)":{"details":"Sets the default fee basis points (BPS) for all destinations."},"setFeeBps(uint32,uint16,bool)":{"details":"Sets the fee basis points (BPS) for a specific destination LayerZero EndpointV2 ID."},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@layerzerolabs/=node_modules/@layerzerolabs/","@openzeppelin/=node_modules/@openzeppelin/","ds-test/=node_modules/@layerzerolabs/toolbox-foundry/lib/ds-test/","forge-std/=node_modules/@layerzerolabs/toolbox-foundry/lib/forge-std/","solidity-bytes-utils/contracts/=node_modules/@layerzerolabs/toolbox-foundry/lib/solidity-bytes-utils/"],"optimizer":{"enabled":true,"runs":20000},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"contracts/Fee.sol":"Fee"},"evmVersion":"shanghai","libraries":{}},"sources":{"contracts/Fee.sol":{"keccak256":"0x23577492bb3451678efc299cc5ea5552eb98e97998f77e2f076acbc02659bbf0","urls":["bzz-raw://ff0ee4eb1c8a74468a3684df552477bc0ba706ff50fcc1bbb1452dc29922a05d","dweb:/ipfs/QmZmpqYVT7GydPnXzzNGfUCEbBQzQuJsV9USfZWjoqJ9DJ"],"license":null},"contracts/interfaces/IFee.sol":{"keccak256":"0x548eab6ed7c925c9769b6bed6416bb67643338b1785c34491d90ac3b3ad00bc3","urls":["bzz-raw://84e16d44b5e323573b81e7bcd196829b80d9634e48768a2445b872fd1c4ba234","dweb:/ipfs/QmbawDMDYnEXMCenaZjWiBdcRGnDuH1HmnQSt5h1iNN2Wi"],"license":null},"node_modules/@openzeppelin/contracts/access/Ownable.sol":{"keccak256":"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb","urls":["bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6","dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","urls":["bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12","dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF"],"license":"MIT"}},"version":1},"id":0}