1.0.31 • Published 30 days ago

@synapsecns/contracts-core v1.0.31

Weekly downloads
-
License
MIT
Repository
github
Last release
30 days ago

GitHub Workflow Status (with event) GitHub Workflow Status (with event) Static Badge npm

@synapsecns/contracts-core contain the Solidity contracts used within the Synapse Interchain Network messaging system.

Usage

These contracts can be installed with:

npm i @synapsecns/contracts-core

Please refer to our usage guide or examples

Directory Structure

Running a devnet

To run a devnet, you can run make devnet-up and make devnet-deploy from this directory. This will start a local devnet and deploy the contracts to it. RPC endpoints for debugging etc will be availabe at http://localhost:9001/rpc/[chain_id].

By default, the PingPongClient.sol is deployed, so you can interact with it with cast. For instance, to send a ping from chain 42 to chain 44:

cast send 0x521F44132489CDD54c9ceC8167CfC377CbAEa351 --rpc-url http://localhost:9001/rpc/42 --private-key 0x526db1890baf94e82162f17f25ad769eb7f981272d8d99c527ea1af443c2d0cc "doPing(uint32,address,uint16)" 44 0x521F44132489CDD54c9ceC8167CfC377CbAEa351 1

Now, to make sure it work, you can pull up scribe by going to http://localhost:9002/graphiql and querying the logs for chain 44:

{

  logs(chain_id: 44, page: 1){
    topics
    block_number
    contract_address
  }
}

If everything went well, you will see topic 0x0a72872b9cfe43d6c13b13553f28d4879e427f3b456545649fd0761fdcbe0311 in the logs, which is the topic for the PingPongClient's Pong event.

graphql screenshot

1.0.31

30 days ago

1.0.30

1 month ago

1.0.29

1 month ago

1.0.28

1 month ago

1.0.25

6 months ago

1.0.24

6 months ago

1.0.23

6 months ago

1.0.22

6 months ago

1.0.21

6 months ago

1.0.20

6 months ago

1.0.19

6 months ago

1.0.18

6 months ago

1.0.17

7 months ago

1.0.16

7 months ago

1.0.15

7 months ago

1.0.14

8 months ago

1.0.13

8 months ago

1.0.12

8 months ago