contractsV2
contractsV2 copied to clipboard
Smart contract address
Hi team,
I've read the document (https://ooki.gitbook.io/ooki/developers/contracts) and found the following code snippet.
BZX = Contract.from_abi("BZX", "0xfe4F0eb0A1Ad109185c9AaDE64C48ff8e928e54B", interface.IBZx.abi)
iUSDTAddress = BZX.underlyingToLoanPool(USDT.address)
iUSDT = Contract.from_abi("iUSDT", address=iUSDTAddress, abi=LoanTokenLogicStandard.abi)
iUSDT.marginTrade('0x0000000000000000000000000000000000000000000000000000000000000000', 5e18, 0, 10e18, '0x0000000000000000000000000000000000000000', accounts[0], b'', {'from': accounts[0], "value": 10e18})
loan =BZX.getLoan(history[-1].return_value[0])
Is the address given in the first line accurate? If not, where can I find the contract address for this? I've tried to interact with the contract in the forked mainnet, using Truffle and Ganach. However, the retured log of JSON RPC seems to suggest that this address does not have any contract deployed at it.
> "jsonrpc": "2.0",
> "id": 36,
> "method": "eth_getCode",
> "params": [
> "0xfe4f0eb0a1ad109185c9aade64c48ff8e928e54b",
> "0x14088d3"
> ]
> }
< {
< "id": 36,
< "jsonrpc": "2.0",
< "result": "0x"
< }
> {
Alternatively, if you can provide me with more detailed instruction for calling 'marginTrade' method, it would be appreciated.