telescope icon indicating copy to clipboard operation
telescope copied to clipboard

multiplexing versions

Open pyramation opened this issue 2 years ago • 0 comments

In block explorers such as ping.pub, we need to write code that multiplexes versions.

(see example from ping.pub)

const getProposalFunction = (sdk_version) => { 
    switch(sdk_version) {
      case '0.46': 
        return client.cosmos.gov.v1.proposals;
      default:
        return client.cosmos.gov.v1beta1.proposals;
    }
}

pyramation avatar Jan 06 '23 03:01 pyramation