5 txs
4 calls
constructor
constructor(uint256 priceChangeThresholdE18_)
functions
DEFAULT_ADMIN_ROLE
viewfunction DEFAULT_ADMIN_ROLE() view returns (bytes32)
getLatestPrice
viewfunction getLatestPrice(uint256 tokenId) view returns (uint256)
getLatestPriceAndDecimals
viewfunction getLatestPriceAndDecimals(uint256 tokenId) view returns (uint256 price, uint8 decimals)
getPrice
viewfunction getPrice(uint256 tokenId) view returns (uint256)
getPriceAndDecimals
viewfunction getPriceAndDecimals(uint256 tokenId) view returns (uint256 price, uint8 decimals)
getPriceFeedAddress
viewfunction getPriceFeedAddress(uint256 tokenId) view returns (address)
getPriceFeedDecimals
viewfunction getPriceFeedDecimals(uint256 tokenId) view returns (uint8)
getRoleAdmin
viewfunction getRoleAdmin(bytes32 role) view returns (bytes32)
getValidityPeriod
viewfunction getValidityPeriod(uint256 tokenId) view returns (uint256)
hasRole
viewfunction hasRole(bytes32 role, address account) view returns (bool)
needUpdate
viewfunction needUpdate(uint256 newPrice, uint256 currentPrice) view returns (bool)
needUpdate
viewfunction needUpdate(uint256 tokenId) view returns (bool, uint256)
priceChangeThresholdE18
viewfunction priceChangeThresholdE18() view returns (uint256)
supportsInterface
viewfunction supportsInterface(bytes4 interfaceId) view returns (bool)
tokenIdToki
purefunction tokenIdToki() pure returns (uint256)
grantRole
nonpayablefunction grantRole(bytes32 role, address account)
renounceRole
nonpayablefunction renounceRole(bytes32 role, address callerConfirmation)
revokeRole
nonpayablefunction revokeRole(bytes32 role, address account)
setPriceChangeThreshold
nonpayablefunction setPriceChangeThreshold(uint256 priceChangeThresholdE18_)
setPriceFeedAddress
nonpayablefunction setPriceFeedAddress(uint256 tokenId, address priceFeedAddress, uint256 validityPeriodInSeconds)
setValidityPeriod
nonpayablefunction setValidityPeriod(uint256 tokenId, uint256 validityPeriodInSeconds)
updatePrice
nonpayablefunction updatePrice(uint256 tokenId, bool forceUpdate)
events
PriceUpdated
event PriceUpdated(uint256 indexed tokenId, uint256 price)
RoleAdminChanged
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole)
RoleGranted
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender)
RoleRevoked
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender)
SetPriceChangeThreshold
event SetPriceChangeThreshold(uint256 priceChangeThreshold)
SetPriceFeedAddress
event SetPriceFeedAddress(uint256 tokenId, address priceFeedAddress)
SetValidityPeriod
event SetValidityPeriod(uint256 tokenId, uint256 newValidityPeriod)
errors
AccessControlBadConfirmation
error AccessControlBadConfirmation()
AccessControlUnauthorizedAccount
error AccessControlUnauthorizedAccount(address account, bytes32 neededRole)
TokiCannotCloseChannel
error TokiCannotCloseChannel()
TokiCannotTimeoutPacket
error TokiCannotTimeoutPacket()
TokiChannelNotFound
error TokiChannelNotFound(string portId, string channelId)
TokiContractNotAllowed
error TokiContractNotAllowed(string name, address addr)
TokiDepeg
error TokiDepeg(uint256 poolId)
TokiDstChainIdNotAccepted
error TokiDstChainIdNotAccepted(uint256 dstChainId)
TokiDstOuterGasShouldBeZero
error TokiDstOuterGasShouldBeZero()
TokiExceed
error TokiExceed(string name, uint256 value, uint256 limit)
TokiExceedAdd
error TokiExceedAdd(string name, uint256 current, uint256 add, uint256 limit)
TokiFailToRefund
error TokiFailToRefund()
TokiFallbackUnauthorized
error TokiFallbackUnauthorized(address caller)
TokiFlowRateLimitExceed
error TokiFlowRateLimitExceed(uint256 current, uint256 add, uint256 limit)
TokiInsufficientAmount
error TokiInsufficientAmount(string name, uint256 value, uint256 needed)
TokiInsufficientPoolLiquidity
error TokiInsufficientPoolLiquidity(uint256 value, uint256 needed)
TokiInvalidAppVersion
error TokiInvalidAppVersion(uint256 expected, uint256 actual)
TokiInvalidBalanceDeficitFeeZone
error TokiInvalidBalanceDeficitFeeZone()
TokiInvalidPacketType
error TokiInvalidPacketType(uint8)
TokiInvalidProposedVersion
error TokiInvalidProposedVersion(string version)
TokiInvalidRecipientBytes
error TokiInvalidRecipientBytes()
TokiInvalidRetryType
error TokiInvalidRetryType(uint8)
TokiInvalidSafeZoneRange
error TokiInvalidSafeZoneRange(uint256 min, uint256 max)
TokiMock
error TokiMock(string message)
TokiNativeTransferIsFailed
error TokiNativeTransferIsFailed(address to, uint256 value)
TokiNoFee
error TokiNoFee()
TokiNoPeerPoolInfo
error TokiNoPeerPoolInfo()
TokiNoPool
error TokiNoPool(uint256 poolId)
TokiNoRevertReceive
error TokiNoRevertReceive()
TokiNotEnoughNativeFee
error TokiNotEnoughNativeFee(uint256 value, uint256 limit)
TokiPeerPoolInfoNotFound
error TokiPeerPoolInfoNotFound(uint256 chainId, uint256 poolId)
TokiPeerPoolIsAlreadyActive
error TokiPeerPoolIsAlreadyActive(uint256 chainId, uint256 poolId)
TokiPeerPoolIsNotReady
error TokiPeerPoolIsNotReady(uint256 peerChainId, uint256 peerPoolId)
TokiPeerPoolIsRegistered
error TokiPeerPoolIsRegistered(uint256 chainId, uint256 poolId)
TokiPoolRecvIsFailed
error TokiPoolRecvIsFailed(uint256 poolId)
TokiPoolWithdrawConfirmIsFailed
error TokiPoolWithdrawConfirmIsFailed(uint256 poolId)
TokiPriceIsExpired
error TokiPriceIsExpired(uint256 updatedAt)
TokiPriceIsNotPositive
error TokiPriceIsNotPositive(int256 value)
TokiRequireOrderedChannel
error TokiRequireOrderedChannel()
TokiRetryExpired
error TokiRetryExpired(uint256 expiryBlock)
TokiSamePool
error TokiSamePool(uint256 poolId, address pool)
TokiSlippageTooHigh
error TokiSlippageTooHigh(uint256 amountGD, uint256 eqReward, uint256 eqFee, uint256 minAmountGD)
TokiTransferIsFailed
error TokiTransferIsFailed(address token, address to, uint256 value)
TokiTransferIsStop
error TokiTransferIsStop()
TokiUnregisteredChainId
error TokiUnregisteredChainId(string channel)
TokiUnregisteredPoolId
error TokiUnregisteredPoolId(uint256 poolId)
TokiZeroAddress
error TokiZeroAddress(string message)
TokiZeroAmount
error TokiZeroAmount(string message)
TokiZeroValue
error TokiZeroValue(string message)
creation bytecode
0x60803461005b57601f6112a338819003918201601f19168301916001600160401b0383118484101761005f5780849260209460405283398101031261005b575160035561004b33610073565b5060405161118690816100fd8239f35b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b6001600160a01b0381165f9081525f5160206112835f395f51905f52602052604090205460ff166100f7576001600160a01b03165f8181525f5160206112835f395f51905f5260205260408120805460ff191660011790553391907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8180a4600190565b505f9056fe60806040526004361015610011575f80fd5b5f3560e01c80630106a82e14610b0d57806301ffc9a714610a4e5780630389f13a146109e457806318e893d3146109c1578063233c9aae14610706578063242ef16e1461066e578063248a9ca314610626578063298c1660146105de5780632ea3bf01146105705780632f2ff15d1461051557806336568abe1461048d5780633ac6a38114610443578063585dc227146103dd578063599ad6fd146103a257806391d148541461032e578063a0b50fe3146102d3578063a217fddf1461029b578063b94fe91714610257578063cb36e89a1461020f578063d547741f146101ad578063e134aa13146101575763e75722301461010b575f80fd5b346101535760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610153576004355f526001602052602060405f2054604051908152f35b5f80fd5b34610153577fbc75ff48405ab741dc703a79cf0104a5e4370e1c63d494c2888f7d491c756afe604061018836610b57565b610190610e7d565b815f526002602052806001845f20015582519182526020820152a1005b346101535760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101535761020d6004356101ea610b8b565b90610208610203825f525f602052600160405f20015490565b610ee5565b61101d565b005b346101535760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610153576020604061024d6004356110e5565b0151604051908152f35b346101535760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610153576020610293600435610d3c565b604051908152f35b34610153575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101535760206040515f8152f35b346101535760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015357602073ffffffffffffffffffffffffffffffffffffffff6103246004356110e5565b5116604051908152f35b346101535760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015357610365610b8b565b6004355f525f60205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060ff60405f2054166040519015158152f35b34610153575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610153576020600354604051908152f35b346101535760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101535760043561042860ff602061041f846110e5565b01511691610d3c565b6040805191825260ff909216602082015290819081015b0390f35b346101535760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015357602060ff816104826004356110e5565b015116604051908152f35b346101535760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610153576104c4610b8b565b3373ffffffffffffffffffffffffffffffffffffffff8216036104ed5761020d9060043561101d565b7f6697b232000000000000000000000000000000000000000000000000000000005f5260045ffd5b346101535760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101535761020d600435610552610b8b565b9061056b610203825f525f602052600160405f20015490565b610f4b565b346101535760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101535760043560ff60206105af836110e5565b015116905f52600160205260405f205461043f6040519283928390929160ff6020916040840195845216910152565b34610153575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101535760206040516f544f4b49544f4b49544f4b49544f4b498152f35b346101535760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101535760206102936004355f525f602052600160405f20015490565b346101535760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610153576004356024358015158103610153576106b582610bae565b9181156106fe575b506106c457005b60207f945c1c4e99aa89f648fbfe3df471b916f719e16d960fcec0737d4d56bd69683891835f52600182528060405f2055604051908152a2005b9050836106bd565b346101535760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015357600435610740610b8b565b73ffffffffffffffffffffffffffffffffffffffff60443591610761610e7d565b168015610962576040517f313ce567000000000000000000000000000000000000000000000000000000008152602081600481855afa908115610957575f916108f3575b50917f05ae75b97898fa8f1b29c927f2c392a2feff0bf73b255672d0dbb4fd53b90f6960407fbc75ff48405ab741dc703a79cf0104a5e4370e1c63d494c2888f7d491c756afe9593819560018351916107fd83610c8e565b83835260ff602084019116815284830190878252885f52600260205273ffffffffffffffffffffffffffffffffffffffff865f209451167fffffffffffffffffffffff00000000000000000000000000000000000000000074ff00000000000000000000000000000000000000008654935160a01b16921617178355519101558461088781610bae565b9080156108ec575b6108af575b50508151908582526020820152a182519182526020820152a1005b60207f945c1c4e99aa89f648fbfe3df471b916f719e16d960fcec0737d4d56bd69683891835f526001825280865f20558551908152a28488610894565b505f61088f565b90506020939193813d60201161094f575b8161091160209383610cd7565b8101031261015357519160ff8316830361015357909290917f05ae75b97898fa8f1b29c927f2c392a2feff0bf73b255672d0dbb4fd53b90f696107a5565b3d9150610904565b6040513d5f823e3d90fd5b6040517fd786f8be00000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f70726963654665656441646472657373000000000000000000000000000000006044820152606490fd5b346101535760206109da6109d436610b57565b90610bd3565b6040519015158152f35b346101535760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610153577f6970bd7fff2a2ac48ea07357abf5c546b03191568a217eca31b5b1adf8cc45f16020600435610a41610e7d565b80600355604051908152a1005b346101535760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610153576004357fffffffff00000000000000000000000000000000000000000000000000000000811680910361015357807f7965db0b0000000000000000000000000000000000000000000000000000000060209214908115610ae3575b506040519015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501482610ad8565b346101535760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610153576040610b49600435610bae565b825191151582526020820152f35b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc6040910112610153576004359060243590565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361015357565b90815f526001602052610bcf610bc860405f205493610d3c565b9283610bd3565b9190565b908015918215610be257505090565b8180821115610c7e57610bf491610d2f565b915b670de0b6b3a7640000830292808404670de0b6b3a76400001490151715610c5157610c245760035491041190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b90610c8891610d2f565b91610bf6565b6060810190811067ffffffffffffffff821117610caa57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117610caa57604052565b519069ffffffffffffffffffff8216820361015357565b91908203918211610c5157565b610d476004916110e5565b60a073ffffffffffffffffffffffffffffffffffffffff825116604051938480927ffeaf968c0000000000000000000000000000000000000000000000000000000082525afa908115610957575f925f92610e27575b505f831315610dfb5742821015610df2576040610dba8342610d2f565b915b015110610dc7575090565b7fc8341324000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b60405f91610dbc565b827f68158112000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b9250905060a0823d60a011610e75575b81610e4460a09383610cd7565b8101031261015357610e5582610d18565b506020820151610e6c608060608501519401610d18565b5091905f610d9d565b3d9150610e37565b335f9081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff1615610eb557565b7fe2517d3f000000000000000000000000000000000000000000000000000000005f52336004525f60245260445ffd5b805f525f60205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f5260205260ff60405f20541615610f1c5750565b7fe2517d3f000000000000000000000000000000000000000000000000000000005f523360045260245260445ffd5b805f525f60205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260ff60405f205416155f1461101757805f525f60205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260405f2060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905573ffffffffffffffffffffffffffffffffffffffff339216907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d5f80a4600190565b50505f90565b805f525f60205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260ff60405f2054165f1461101757805f525f60205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00815416905573ffffffffffffffffffffffffffffffffffffffff339216907ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b5f80a4600190565b5f604080516110f381610c8e565b82815282602082015201525f52600260205260405f206040519061111682610c8e565b600181549160ff73ffffffffffffffffffffffffffffffffffffffff84169384865260a01c1660208501520154604083015215610962579056fea2646970667358221220600117d2b1d172648646b3baf3c328fc24037e5b8f8ff10363fe253a4050990664736f6c634300081c0033ad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb500000000000000000000000000000000000000000000000000b1a2bc2ec50000