Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smart contract address #337

Open
Utatistics opened this issue Oct 22, 2024 · 0 comments
Open

Smart contract address #337

Utatistics opened this issue Oct 22, 2024 · 0 comments

Comments

@Utatistics
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant